@@ -1023,7 +1023,10 @@ initTypecheckEnv hsc_env mod = initTc hsc_env HsSrcFile False mod fakeSpan
1023
1023
fakeSpan :: RealSrcSpan
1024
1024
fakeSpan = realSrcLocSpan $ mkRealSrcLoc (Util. fsLit " <ghcide>" ) 1 1
1025
1025
1026
-
1026
+ -- | Non-interactive handling of the module interface.
1027
+ -- A non-interactive modification of code from the 'GHC.Runtime.Eval.getDocs'.
1028
+ -- The interactive paths create problems in ghc-lib builds
1029
+ --- and lead to fun errors like "Cannot continue after interface file error".
1027
1030
getDocsNonInteractive'
1028
1031
:: Name
1029
1032
-> IOEnv
@@ -1034,7 +1037,7 @@ getDocsNonInteractive'
1034
1037
getDocsNonInteractive' name =
1035
1038
case nameModule_maybe name of
1036
1039
Nothing -> return (name, Left $ NameHasNoModule name)
1037
- Just mod -> do
1040
+ Just mod -> do -- in GHC here was an interactive check & handling.
1038
1041
ModIface
1039
1042
{ mi_doc_hdr = mb_doc_hdr
1040
1043
, mi_decl_docs = DeclDocMap dmap
@@ -1053,8 +1056,6 @@ getDocsNonInteractive' name =
1053
1056
else Right (Map. lookup name dmap, Map. lookup name amap)
1054
1057
1055
1058
-- | Non-interactive modification of 'GHC.Runtime.Eval.getDocs'.
1056
- -- The interactive paths create problems in ghc-lib builds
1057
- --- and lead to fun errors like "Cannot continue after interface file error".
1058
1059
getDocsNonInteractive :: HscEnv -> Module -> Name -> IO (Either GHC. ErrorMessages (Name , Either GetDocsFailure (Maybe HsDocString , Maybe (Map. Map Int HsDocString ))))
1059
1060
getDocsNonInteractive hsc_env mod name = do
1060
1061
((_warns,errs), res) <- initTypecheckEnv hsc_env mod $ getDocsNonInteractive' name
0 commit comments