From 33420799be593cb34b5330193d21956d90ede803 Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 4 Nov 2020 20:28:23 +0100 Subject: [PATCH 1/4] Bump up ghcide submodule to e922a1 --- ghcide | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghcide b/ghcide index d76fbf9a5c..e922a16234 160000 --- a/ghcide +++ b/ghcide @@ -1 +1 @@ -Subproject commit d76fbf9a5cb34312d8f13c3a908cc98779284313 +Subproject commit e922a1623434951df34480907d7d50cab92e6b18 From 741e667df1da2738a72599cbdcd2c2102a39865c Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 4 Nov 2020 22:28:42 +0100 Subject: [PATCH 2/4] Adapt plugins to ghcide api changes --- plugins/default/src/Ide/Plugin/Eval.hs | 2 +- plugins/default/src/Ide/Plugin/Retrie.hs | 2 +- plugins/tactics/src/Ide/Plugin/Tactic.hs | 2 +- plugins/tactics/src/Ide/Plugin/Tactic/Types.hs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/default/src/Ide/Plugin/Eval.hs b/plugins/default/src/Ide/Plugin/Eval.hs index 2da1e7386f..28a16f383e 100644 --- a/plugins/default/src/Ide/Plugin/Eval.hs +++ b/plugins/default/src/Ide/Plugin/Eval.hs @@ -176,7 +176,7 @@ runEvalCmd lsp state EvalParams {..} = withIndefiniteProgress lsp "Eval" Cancell toNormalizedFilePath' $ fp - ms <- + (ms, _) <- liftIO $ runAction "runEvalCmd.getModSummary" state $ use_ GetModSummary $ diff --git a/plugins/default/src/Ide/Plugin/Retrie.hs b/plugins/default/src/Ide/Plugin/Retrie.hs index ebfee268cc..ffb3591730 100644 --- a/plugins/default/src/Ide/Plugin/Retrie.hs +++ b/plugins/default/src/Ide/Plugin/Retrie.hs @@ -360,7 +360,7 @@ callRetrie state session rewrites origin restrictToOriginatingFile = do getCPPmodule t = do nt <- toNormalizedFilePath' <$> makeAbsolute t let getParsedModule f contents = do - modSummary <- + (modSummary, _) <- useOrFail "GetModSummary" (CallRetrieInternalError "file not found") GetModSummary nt let ms' = modSummary diff --git a/plugins/tactics/src/Ide/Plugin/Tactic.hs b/plugins/tactics/src/Ide/Plugin/Tactic.hs index 206bf8eb2c..41deaa7eb6 100644 --- a/plugins/tactics/src/Ide/Plugin/Tactic.hs +++ b/plugins/tactics/src/Ide/Plugin/Tactic.hs @@ -247,7 +247,7 @@ judgementForHole state nfp range = do -- Ok to use the stale 'ModIface', since all we need is its 'DynFlags' -- which don't change very often. - (modsum, _) <- MaybeT $ runIde state $ useWithStale GetModSummaryWithoutTimestamps nfp + ((modsum,_), _) <- MaybeT $ runIde state $ useWithStale GetModSummaryWithoutTimestamps nfp let dflags = ms_hspp_opts modsum (rss, goal) <- liftMaybe $ join $ listToMaybe $ M.elems $ flip M.mapWithKey (getAsts $ hieAst asts) $ \fs ast -> diff --git a/plugins/tactics/src/Ide/Plugin/Tactic/Types.hs b/plugins/tactics/src/Ide/Plugin/Tactic/Types.hs index 95e80f004f..d78ad22807 100644 --- a/plugins/tactics/src/Ide/Plugin/Tactic/Types.hs +++ b/plugins/tactics/src/Ide/Plugin/Tactic/Types.hs @@ -65,7 +65,7 @@ instance Show Var where instance Show TCvSubst where show = unsafeRender -instance Show (LHsExpr GhcPs) where +instance {-# OVERLAPPING #-} Show (LHsExpr GhcPs) where show = unsafeRender instance Show DataCon where From 056bd41e2a6a11d927f7e0778ab547315d70c4de Mon Sep 17 00:00:00 2001 From: jneira Date: Sat, 7 Nov 2020 22:28:02 +0100 Subject: [PATCH 3/4] Update ghcide to 0.5.0 release --- ghcide | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghcide b/ghcide index e922a16234..dcf6804027 160000 --- a/ghcide +++ b/ghcide @@ -1 +1 @@ -Subproject commit e922a1623434951df34480907d7d50cab92e6b18 +Subproject commit dcf680402722e7660377bf7da3fca27c2bde988f From 59695c28fc157336e8cd1f1f8bf31794f6a8a625 Mon Sep 17 00:00:00 2001 From: jneira Date: Sat, 7 Nov 2020 23:24:36 +0100 Subject: [PATCH 4/4] Remove unused instance using Orphans --- plugins/tactics/src/Ide/Plugin/Tactic/Types.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/tactics/src/Ide/Plugin/Tactic/Types.hs b/plugins/tactics/src/Ide/Plugin/Tactic/Types.hs index d78ad22807..9d08934e94 100644 --- a/plugins/tactics/src/Ide/Plugin/Tactic/Types.hs +++ b/plugins/tactics/src/Ide/Plugin/Tactic/Types.hs @@ -32,6 +32,7 @@ import Data.Map (Map) import Data.Set (Set) import Data.Tree import Development.IDE.GHC.Compat hiding (Node) +import Development.IDE.GHC.Orphans () import Development.IDE.Types.Location import GHC.Generics import Ide.Plugin.Tactic.Debug @@ -65,9 +66,6 @@ instance Show Var where instance Show TCvSubst where show = unsafeRender -instance {-# OVERLAPPING #-} Show (LHsExpr GhcPs) where - show = unsafeRender - instance Show DataCon where show = unsafeRender