Skip to content

Commit cc19246

Browse files
committed
ghcide: Core.Compile: add GHC compatibility
1 parent e240c8d commit cc19246

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ghcide/src/Development/IDE/Core/Compile.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ getDocsNonInteractive' name =
10281028
-- | Non-interactive modification of 'GHC.Runtime.Eval.getDocs'.
10291029
-- The interactive paths create problems in ghc-lib builds
10301030
--- and lead to fun errors like "Cannot continue after interface file error".
1031-
getDocsNonInteractive :: HscEnv -> Module -> Name -> IO (Either ErrorMessages (Name, Either GetDocsFailure (Maybe HsDocString, Maybe (Map.Map Int HsDocString))))
1031+
getDocsNonInteractive :: HscEnv -> Module -> Name -> IO (Either GHC.ErrorMessages (Name, Either GetDocsFailure (Maybe HsDocString, Maybe (Map.Map Int HsDocString))))
10321032
getDocsNonInteractive hsc_env mod name = do
10331033
((_warns,errs), res) <- initTypecheckEnv hsc_env mod $ getDocsNonInteractive' name
10341034
pure $ maybeToEither errs res
@@ -1039,7 +1039,8 @@ getDocsBatch
10391039
:: HscEnv
10401040
-> Module -- ^ a moudle where the names are in scope
10411041
-> [Name]
1042-
-> IO (Either ErrorMessages (Map.Map Name (Either GetDocsFailure (Maybe HsDocString, Maybe (Map.Map Int HsDocString)))))
1042+
-- 2021-11-18: NOTE: Map Int would become IntMap if next GHCs.
1043+
-> IO (Either GHC.ErrorMessages (Map.Map Name (Either GetDocsFailure (Maybe HsDocString, Maybe (Map.Map Int HsDocString)))))
10431044
-- ^ Return a 'Map' of 'Name's to 'Either' (no docs messages) (general doc body & arg docs)
10441045
getDocsBatch hsc_env mod names = do
10451046
((_warns,errs), res) <- initTypecheckEnv hsc_env mod $ Map.fromList <$> traverse getDocsNonInteractive' names

0 commit comments

Comments
 (0)