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

Remove ghc-project-types #1487

Merged
merged 3 commits into from
Dec 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,4 @@

[submodule "submodules/cabal-helper"]
path = submodules/cabal-helper
# url = https://github.com/DanielG/cabal-helper.git
# Change this back once https://github.com/DanielG/cabal-helper/pull/85/ merged
url = https://github.com/bubba/cabal-helper.git

[submodule "submodules/ghc-mod"]
path = submodules/ghc-mod
url = https://github.com/fendor/ghc-mod.git
url = https://github.com/DanielG/cabal-helper.git
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
1 change: 0 additions & 1 deletion stack.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

- deque-0.4.3
- ansi-terminal-0.8.2
Expand Down
2 changes: 1 addition & 1 deletion submodules/cabal-helper
1 change: 0 additions & 1 deletion submodules/ghc-mod
Submodule ghc-mod deleted from 7757a1