Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Commit

Permalink
Remove ghc-project-types
Browse files Browse the repository at this point in the history
They are only used for the GHC module graph, which is currently not
generated in any useful way, so not used.

Closes #1486
  • Loading branch information
alanz committed Dec 21, 2019
1 parent f94557b commit 738a019
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 23 deletions.
1 change: 0 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ packages:

-- ./submodules/HaRe
./submodules/cabal-helper/
./submodules/ghc-mod/ghc-project-types

tests: true

Expand Down
14 changes: 10 additions & 4 deletions hie-plugin-api/Haskell/Ide/Engine/Ghc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module Haskell.Ide.Engine.Ghc
setTypecheckedModule
, Diagnostics(..)
, AdditionalErrs
, cabalModuleGraphs
-- , cabalModuleGraphs
, makeRevRedirMapFunc
) where

Expand All @@ -22,7 +22,7 @@ import Control.Monad.IO.Class
import Control.Monad ( when )
import Data.IORef
import qualified Data.Map.Strict as Map
import qualified Data.IntMap.Strict as IM
-- import qualified Data.IntMap.Strict as IM
import Data.Semigroup ((<>), Semigroup)
import qualified Data.Set as Set
import qualified Data.Text as T
Expand Down Expand Up @@ -52,10 +52,10 @@ import qualified HIE.Bios.Ghc.Load as BIOS

import System.Directory

import GhcProject.Types as GM
import GhcMake ( moduleGraphNodes )
-- import GhcMake ( moduleGraphNodes )
import GhcMonad

-- ---------------------------------------------------------------------

newtype Diagnostics = Diagnostics (Map.Map NormalizedUri (Set.Set Diagnostic))
deriving (Show, Eq)
Expand Down Expand Up @@ -290,6 +290,11 @@ setTypecheckedModule_load uri =

return $ IdeResultOk (Diagnostics diags2,errs)

{-
-- TODO: Come up with a reasonable approach to generate a module graph
-- for a given component or package.
-- TODO: make this work for all components
cabalModuleGraphs :: IdeGhcM [GM.GmModuleGraph]
cabalModuleGraphs = do
Expand All @@ -313,6 +318,7 @@ cabalModuleGraphs = do
]
]
pure [GmModuleGraph gmg]
-}

-- ---------------------------------------------------------------------

Expand Down
11 changes: 2 additions & 9 deletions hie-plugin-api/Haskell/Ide/Engine/PluginApi.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,8 @@ setTypecheckedModule

module Haskell.Ide.Engine.PluginApi
(
-- ** Re-exported from ghc-mod via ghc-project-types
GP.GmModuleGraph(..)
, GP.ModulePath(..)
, GP.GmComponent(..)
, GP.GmComponentType(..)

-- * IDE monads
, HIE.IdeState(..)
HIE.IdeState(..)
, HIE.IdeGhcM
, HIE.runIdeGhcM
, HIE.runActionWithContext
Expand All @@ -46,7 +40,7 @@ module Haskell.Ide.Engine.PluginApi
, HIE.iterT
, HIE.LiftsToGhc(..)
, HIE.HasGhcModuleCache(..)
, HIE.cabalModuleGraphs
-- , HIE.cabalModuleGraphs
, HIE.makeRevRedirMapFunc

-- * Using the HIE module cache etc
Expand All @@ -72,7 +66,6 @@ module Haskell.Ide.Engine.PluginApi



import qualified GhcProject.Types as GP
import qualified Haskell.Ide.Engine.Ghc as HIE
import qualified Haskell.Ide.Engine.GhcModuleCache as HIE (CachedInfo(..),HasGhcModuleCache(..),emptyModuleCache)
import qualified Haskell.Ide.Engine.ModuleCache as HIE (ifCachedModule,runActionWithContext )
Expand Down
1 change: 0 additions & 1 deletion hie-plugin-api/hie-plugin-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ library
, free
, ghc
, hie-bios >= 0.3.2 && < 0.4.0
, ghc-project-types >= 5.9.0.0
, cabal-helper
, haskell-lsp == 0.19.*
, hslogger
Expand Down
1 change: 0 additions & 1 deletion stack-8.4.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ packages:
extra-deps:
# - ./submodules/HaRe
- ./submodules/cabal-helper
- ./submodules/ghc-mod/ghc-project-types

- brittany-0.12.1.0
- base-compat-0.9.3
Expand Down
1 change: 0 additions & 1 deletion stack-8.4.3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ packages:
extra-deps:
# - ./submodules/HaRe
- ./submodules/cabal-helper
- ./submodules/ghc-mod/ghc-project-types

- base-compat-0.9.3
- brittany-0.12.1.0
Expand Down
1 change: 0 additions & 1 deletion stack-8.4.4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ packages:
extra-deps:
# - ./submodules/HaRe
- ./submodules/cabal-helper
- ./submodules/ghc-mod/ghc-project-types

- brittany-0.12.1.0
- bytestring-trie-0.2.5.0
Expand Down
1 change: 0 additions & 1 deletion stack-8.6.1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ packages:
extra-deps:
# - ./submodules/HaRe
- ./submodules/cabal-helper
- ./submodules/ghc-mod/ghc-project-types

- apply-refact-0.6.0.0
- brittany-0.12.1.0
Expand Down
1 change: 0 additions & 1 deletion stack-8.6.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ packages:
extra-deps:
# - ./submodules/HaRe
- ./submodules/cabal-helper
- ./submodules/ghc-mod/ghc-project-types

- brittany-0.12.1.0
- butcher-1.3.2.3
Expand Down
1 change: 0 additions & 1 deletion stack-8.6.3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ packages:
extra-deps:
# - ./submodules/HaRe
- ./submodules/cabal-helper
- ./submodules/ghc-mod/ghc-project-types

- brittany-0.12.1.0
- bytestring-trie-0.2.5.0
Expand Down
1 change: 0 additions & 1 deletion stack-8.6.4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ packages:
extra-deps:
# - ./submodules/HaRe
- ./submodules/cabal-helper
- ./submodules/ghc-mod/ghc-project-types

- brittany-0.12.1.0
- butcher-1.3.2.1
Expand Down
1 change: 0 additions & 1 deletion stack-8.6.5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ packages:
extra-deps:
# - ./submodules/HaRe
- ./submodules/cabal-helper
- ./submodules/ghc-mod/ghc-project-types

- ansi-terminal-0.8.2
- ansi-wl-pprint-0.6.8.2
Expand Down

0 comments on commit 738a019

Please sign in to comment.