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

Commit c4b014e

Browse files
committed
Remove ghc-project-types
They are only used for the GHC module graph, which is currently not generated in any useful way, so not used. Closes #1486
1 parent f94557b commit c4b014e

13 files changed

+12
-24
lines changed

cabal.project

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ packages:
44

55
-- ./submodules/HaRe
66
./submodules/cabal-helper/
7-
./submodules/ghc-mod/ghc-project-types
87

98
tests: true
109

hie-plugin-api/Haskell/Ide/Engine/Ghc.hs

+10-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module Haskell.Ide.Engine.Ghc
1111
setTypecheckedModule
1212
, Diagnostics(..)
1313
, AdditionalErrs
14-
, cabalModuleGraphs
14+
-- , cabalModuleGraphs
1515
, makeRevRedirMapFunc
1616
) where
1717

@@ -22,7 +22,7 @@ import Control.Monad.IO.Class
2222
import Control.Monad ( when )
2323
import Data.IORef
2424
import qualified Data.Map.Strict as Map
25-
import qualified Data.IntMap.Strict as IM
25+
-- import qualified Data.IntMap.Strict as IM
2626
import Data.Semigroup ((<>), Semigroup)
2727
import qualified Data.Set as Set
2828
import qualified Data.Text as T
@@ -52,10 +52,10 @@ import qualified HIE.Bios.Ghc.Load as BIOS
5252

5353
import System.Directory
5454

55-
import GhcProject.Types as GM
56-
import GhcMake ( moduleGraphNodes )
55+
-- import GhcMake ( moduleGraphNodes )
5756
import GhcMonad
5857

58+
-- ---------------------------------------------------------------------
5959

6060
newtype Diagnostics = Diagnostics (Map.Map NormalizedUri (Set.Set Diagnostic))
6161
deriving (Show, Eq)
@@ -290,6 +290,11 @@ setTypecheckedModule_load uri =
290290

291291
return $ IdeResultOk (Diagnostics diags2,errs)
292292

293+
{-
294+
295+
-- TODO: Come up with a reasonable approach to generate a module graph
296+
-- for a given component or package.
297+
293298
-- TODO: make this work for all components
294299
cabalModuleGraphs :: IdeGhcM [GM.GmModuleGraph]
295300
cabalModuleGraphs = do
@@ -313,6 +318,7 @@ cabalModuleGraphs = do
313318
]
314319
]
315320
pure [GmModuleGraph gmg]
321+
-}
316322

317323
-- ---------------------------------------------------------------------
318324

hie-plugin-api/Haskell/Ide/Engine/PluginApi.hs

+2-9
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,8 @@ setTypecheckedModule
2828

2929
module Haskell.Ide.Engine.PluginApi
3030
(
31-
-- ** Re-exported from ghc-mod via ghc-project-types
32-
GP.GmModuleGraph(..)
33-
, GP.ModulePath(..)
34-
, GP.GmComponent(..)
35-
, GP.GmComponentType(..)
36-
3731
-- * IDE monads
38-
, HIE.IdeState(..)
32+
HIE.IdeState(..)
3933
, HIE.IdeGhcM
4034
, HIE.runIdeGhcM
4135
, HIE.runActionWithContext
@@ -46,7 +40,7 @@ module Haskell.Ide.Engine.PluginApi
4640
, HIE.iterT
4741
, HIE.LiftsToGhc(..)
4842
, HIE.HasGhcModuleCache(..)
49-
, HIE.cabalModuleGraphs
43+
-- , HIE.cabalModuleGraphs
5044
, HIE.makeRevRedirMapFunc
5145

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

7367

7468

75-
import qualified GhcProject.Types as GP
7669
import qualified Haskell.Ide.Engine.Ghc as HIE
7770
import qualified Haskell.Ide.Engine.GhcModuleCache as HIE (CachedInfo(..),HasGhcModuleCache(..),emptyModuleCache)
7871
import qualified Haskell.Ide.Engine.ModuleCache as HIE (ifCachedModule,runActionWithContext )

hie-plugin-api/hie-plugin-api.cabal

-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ library
5050
, free
5151
, ghc
5252
, hie-bios >= 0.3.2 && < 0.4.0
53-
, ghc-project-types >= 5.9.0.0
5453
, cabal-helper
5554
, haskell-lsp == 0.19.*
5655
, hslogger

stack-8.4.2.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ packages:
66
extra-deps:
77
# - ./submodules/HaRe
88
- ./submodules/cabal-helper
9-
- ./submodules/ghc-mod/ghc-project-types
109

1110
- brittany-0.12.1.0
1211
- base-compat-0.9.3

stack-8.4.3.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ packages:
66
extra-deps:
77
# - ./submodules/HaRe
88
- ./submodules/cabal-helper
9-
- ./submodules/ghc-mod/ghc-project-types
109

1110
- base-compat-0.9.3
1211
- brittany-0.12.1.0

stack-8.4.4.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ packages:
66
extra-deps:
77
# - ./submodules/HaRe
88
- ./submodules/cabal-helper
9-
- ./submodules/ghc-mod/ghc-project-types
109

1110
- brittany-0.12.1.0
1211
- bytestring-trie-0.2.5.0

stack-8.6.1.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ packages:
66
extra-deps:
77
# - ./submodules/HaRe
88
- ./submodules/cabal-helper
9-
- ./submodules/ghc-mod/ghc-project-types
109

1110
- apply-refact-0.6.0.0
1211
- brittany-0.12.1.0

stack-8.6.2.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ packages:
66
extra-deps:
77
# - ./submodules/HaRe
88
- ./submodules/cabal-helper
9-
- ./submodules/ghc-mod/ghc-project-types
109

1110
- brittany-0.12.1.0
1211
- butcher-1.3.2.3

stack-8.6.3.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ packages:
66
extra-deps:
77
# - ./submodules/HaRe
88
- ./submodules/cabal-helper
9-
- ./submodules/ghc-mod/ghc-project-types
109

1110
- brittany-0.12.1.0
1211
- bytestring-trie-0.2.5.0

stack-8.6.4.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ packages:
66
extra-deps:
77
# - ./submodules/HaRe
88
- ./submodules/cabal-helper
9-
- ./submodules/ghc-mod/ghc-project-types
109

1110
- brittany-0.12.1.0
1211
- butcher-1.3.2.1

stack-8.6.5.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ packages:
66
extra-deps:
77
# - ./submodules/HaRe
88
- ./submodules/cabal-helper
9-
- ./submodules/ghc-mod/ghc-project-types
109

1110
- ansi-terminal-0.8.2
1211
- ansi-wl-pprint-0.6.8.2

stack.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ packages:
66
extra-deps:
77
# - ./submodules/HaRe
88
- ./submodules/cabal-helper
9-
- ./submodules/ghc-mod/ghc-project-types
109

1110
- deque-0.4.3
1211
- ansi-terminal-0.8.2

0 commit comments

Comments
 (0)