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

Commit ab595a0

Browse files
committed
Remove ghc-mod dependencies
1 parent 3e907c8 commit ab595a0

File tree

4 files changed

+12
-25
lines changed

4 files changed

+12
-25
lines changed

haskell-ide-engine.cabal

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ library
6666
, fold-debounce
6767
, ghc >= 8.0.1
6868
, ghc-exactprint
69-
, ghc-mod >= 5.9.0.0
70-
, ghc-mod-core >= 5.9.0.0
7169
, gitrev >= 1.1
7270
, haddock-api
7371
, haddock-library
@@ -146,14 +144,14 @@ library hie-test-utils
146144
build-depends: base
147145
, haskell-ide-engine
148146
, haskell-lsp
147+
, hie-bios
149148
, hie-plugin-api
150149
, aeson
151150
, blaze-markup
152151
, containers
153152
, data-default
154153
, directory
155154
, filepath
156-
, ghc-mod-core
157155
, hslogger
158156
, hspec
159157
, hspec-core

src/Haskell/Ide/Engine/Plugin/HaRe.hs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import qualified Data.Text as T
2121
import qualified Data.Text.IO as T
2222
import Exception
2323
import GHC.Generics (Generic)
24-
import qualified GhcMod.Error as GM
25-
import qualified GhcMod.Monad as GM
24+
--import qualified GhcMod.Error as GM
25+
--import qualified GhcMod.Monad as GM
2626
-- import qualified GhcMod.Utils as GM
2727
import Haskell.Ide.Engine.ArtifactMap
2828
import Haskell.Ide.Engine.MonadFunctions
@@ -38,7 +38,6 @@ import Language.Haskell.Refact.HaRe
3838
import Language.Haskell.Refact.Utils.Monad hiding (logm)
3939

4040
-- ---------------------------------------------------------------------
41-
4241
hareDescriptor :: PluginId -> PluginDescriptor
4342
hareDescriptor plId = PluginDescriptor
4443
{ pluginId = plId
@@ -47,7 +46,8 @@ hareDescriptor plId = PluginDescriptor
4746
<> "Haskell 2010 standard, through making use of the GHC API. HaRe attempts to "
4847
<> "operate in a safe way, by first writing new files with proposed changes, and "
4948
<> "only swapping these with the originals when the change is accepted. "
50-
, pluginCommands =
49+
, pluginCommands = []
50+
{-
5151
[ PluginCommand "demote" "Move a definition one level down"
5252
demoteCmd
5353
, PluginCommand "dupdef" "Duplicate a definition"
@@ -66,12 +66,14 @@ hareDescriptor plId = PluginDescriptor
6666
genApplicativeCommand
6767
6868
]
69-
, pluginCodeActionProvider = Just codeActionProvider
69+
-}
70+
, pluginCodeActionProvider = Nothing -- Just codeActionProvider
7071
, pluginDiagnosticProvider = Nothing
7172
, pluginHoverProvider = Nothing
7273
, pluginSymbolProvider = Nothing
7374
, pluginFormattingProvider = Nothing
7475
}
76+
{-
7577
7678
-- ---------------------------------------------------------------------
7779
@@ -324,3 +326,4 @@ codeActionProvider pId docId (J.Range pos _) _ =
324326
let args = [J.toJSON $ HPT (docId ^. J.uri) pos (name <> "'")]
325327
cmd <- mkLspCommand pId aId title (Just args)
326328
return $ J.CodeAction (title <> name) (Just kind) mempty Nothing (Just cmd)
329+
-}

src/Haskell/Ide/Engine/Transport/LspStdio.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,14 +525,15 @@ reactor inp diagIn = do
525525

526526
-- -------------------------------
527527

528-
ReqRename req -> do
528+
{-ReqRename req -> do
529529
liftIO $ U.logs $ "reactor:got RenameRequest:" ++ show req
530530
let (params, doc, pos) = reqParams req
531531
newName = params ^. J.newName
532532
callback = reactorSend . RspRename . Core.makeResponseMessage req
533533
let hreq = GReq tn (Just doc) Nothing (Just $ req ^. J.id) callback
534534
$ HaRe.renameCmd' doc pos newName
535535
makeRequest hreq
536+
-}
536537

537538

538539
-- -------------------------------

test/utils/TestUtils.hs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{-# LANGUAGE CPP, OverloadedStrings, NamedFieldPuns #-}
22
module TestUtils
33
(
4-
testOptions
5-
, withFileLogging
4+
withFileLogging
65
, setupStackFiles
76
, testCommand
87
, runSingleReq
@@ -25,8 +24,6 @@ import Data.Typeable
2524
import Data.Yaml
2625
import qualified Data.Map as Map
2726
import Data.Maybe
28-
import qualified GhcMod.Monad as GM
29-
import qualified GhcMod.Types as GM
3027
import qualified Language.Haskell.LSP.Core as Core
3128
import Haskell.Ide.Engine.MonadTypes
3229
import System.Directory
@@ -41,18 +38,6 @@ import Text.Blaze.Internal
4138

4239
-- ---------------------------------------------------------------------
4340

44-
testOptions :: GM.Options
45-
testOptions = GM.defaultOptions {
46-
GM.optOutput = GM.OutputOpts {
47-
GM.ooptLogLevel = GM.GmError
48-
-- GM.ooptLogLevel = GM.GmVomit
49-
, GM.ooptStyle = GM.PlainStyle
50-
, GM.ooptLineSeparator = GM.LineSeparator "\0"
51-
, GM.ooptLinePrefix = Nothing
52-
}
53-
54-
}
55-
5641

5742
testCommand :: (ToJSON a, Typeable b, ToJSON b, Show b, Eq b)
5843
=> IdePlugins -> IdeGhcM (IdeResult b) -> PluginId -> CommandName -> a -> IdeResult b -> IO ()

0 commit comments

Comments
 (0)