@@ -997,7 +997,10 @@ initTypecheckEnv hsc_env mod = initTc hsc_env HsSrcFile False mod fakeSpan
997
997
fakeSpan :: RealSrcSpan
998
998
fakeSpan = realSrcLocSpan $ mkRealSrcLoc (Util. fsLit " <ghcide>" ) 1 1
999
999
1000
-
1000
+ -- | Non-interactive handling of the module interface.
1001
+ -- A non-interactive modification of code from the 'GHC.Runtime.Eval.getDocs'.
1002
+ -- The interactive paths create problems in ghc-lib builds
1003
+ --- and lead to fun errors like "Cannot continue after interface file error".
1001
1004
getDocsNonInteractive'
1002
1005
:: Name
1003
1006
-> IOEnv
@@ -1008,7 +1011,7 @@ getDocsNonInteractive'
1008
1011
getDocsNonInteractive' name =
1009
1012
case nameModule_maybe name of
1010
1013
Nothing -> return (name, Left $ NameHasNoModule name)
1011
- Just mod -> do
1014
+ Just mod -> do -- in GHC here was an interactive check & handling.
1012
1015
ModIface
1013
1016
{ mi_doc_hdr = mb_doc_hdr
1014
1017
, mi_decl_docs = DeclDocMap dmap
@@ -1027,8 +1030,6 @@ getDocsNonInteractive' name =
1027
1030
else Right (Map. lookup name dmap, Map. lookup name amap)
1028
1031
1029
1032
-- | Non-interactive modification of 'GHC.Runtime.Eval.getDocs'.
1030
- -- The interactive paths create problems in ghc-lib builds
1031
- --- and lead to fun errors like "Cannot continue after interface file error".
1032
1033
getDocsNonInteractive :: HscEnv -> Module -> Name -> IO (Either GHC. ErrorMessages (Name , Either GetDocsFailure (Maybe HsDocString , Maybe (Map. Map Int HsDocString ))))
1033
1034
getDocsNonInteractive hsc_env mod name = do
1034
1035
((_warns,errs), res) <- initTypecheckEnv hsc_env mod $ getDocsNonInteractive' name
0 commit comments