Skip to content

Commit a2a6c2d

Browse files
committed
ghcide: Core.Compile: add GHC compatibility
1 parent 7d9d5ea commit a2a6c2d

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
@@ -1055,7 +1055,7 @@ getDocsNonInteractive' name =
10551055
-- | Non-interactive modification of 'GHC.Runtime.Eval.getDocs'.
10561056
-- The interactive paths create problems in ghc-lib builds
10571057
--- and lead to fun errors like "Cannot continue after interface file error".
1058-
getDocsNonInteractive :: HscEnv -> Module -> Name -> IO (Either ErrorMessages (Name, Either GetDocsFailure (Maybe HsDocString, Maybe (Map.Map Int HsDocString))))
1058+
getDocsNonInteractive :: HscEnv -> Module -> Name -> IO (Either GHC.ErrorMessages (Name, Either GetDocsFailure (Maybe HsDocString, Maybe (Map.Map Int HsDocString))))
10591059
getDocsNonInteractive hsc_env mod name = do
10601060
((_warns,errs), res) <- initTypecheckEnv hsc_env mod $ getDocsNonInteractive' name
10611061
pure $ maybeToEither errs res
@@ -1066,7 +1066,8 @@ getDocsBatch
10661066
:: HscEnv
10671067
-> Module -- ^ a moudle where the names are in scope
10681068
-> [Name]
1069-
-> IO (Either ErrorMessages (Map.Map Name (Either GetDocsFailure (Maybe HsDocString, Maybe (Map.Map Int HsDocString)))))
1069+
-- 2021-11-18: NOTE: Map Int would become IntMap if next GHCs.
1070+
-> IO (Either GHC.ErrorMessages (Map.Map Name (Either GetDocsFailure (Maybe HsDocString, Maybe (Map.Map Int HsDocString)))))
10701071
-- ^ Return a 'Map' of 'Name's to 'Either' (no docs messages) (general doc body & arg docs)
10711072
getDocsBatch hsc_env mod names = do
10721073
((_warns,errs), res) <- initTypecheckEnv hsc_env mod $ Map.fromList <$> traverse getDocsNonInteractive' names

0 commit comments

Comments
 (0)