File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
ghcide/src/Development/IDE Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -1017,11 +1017,12 @@ mkDetailsFromIface session iface linkable = do
1017
1017
initIfaceLoad hsc' (typecheckIface iface)
1018
1018
return (HomeModInfo iface details linkable)
1019
1019
1020
- fakeSpan :: RealSrcSpan
1021
- fakeSpan = realSrcLocSpan $ mkRealSrcLoc (Util. fsLit " <ghcide>" ) 1 1
1022
-
1023
1020
initTypecheckEnv :: HscEnv -> Module -> TcRn r -> IO (Messages , Maybe r )
1024
1021
initTypecheckEnv hsc_env mod = initTc hsc_env HsSrcFile False mod fakeSpan
1022
+ where
1023
+ fakeSpan :: RealSrcSpan
1024
+ fakeSpan = realSrcLocSpan $ mkRealSrcLoc (Util. fsLit " <ghcide>" ) 1 1
1025
+
1025
1026
1026
1027
getDocsNonInteractive'
1027
1028
:: Name
Original file line number Diff line number Diff line change @@ -49,16 +49,16 @@ mkDocMap env rm this_mod =
49
49
k <- foldrM getType (tcg_type_env this_mod) names
50
50
pure $ DKMap d k
51
51
where
52
- getDocs n map
53
- | maybe True (mod == ) $ nameModule_maybe n = pure map -- we already have the docs in this_docs, or they do not exist
52
+ getDocs n mapToSpanDoc
53
+ | maybe True (mod == ) $ nameModule_maybe n = pure mapToSpanDoc -- we already have the docs in this_docs, or they do not exist
54
54
| otherwise = do
55
55
doc <- getDocumentationTryGhc env mod n
56
- pure $ extendNameEnv map n doc
57
- getType n map
56
+ pure $ extendNameEnv mapToSpanDoc n doc
57
+ getType n mapToTyThing
58
58
| isTcOcc $ occName n = do
59
59
kind <- lookupKind env mod n
60
- pure $ maybe map (extendNameEnv map n) kind
61
- | otherwise = pure map
60
+ pure $ maybe mapToTyThing (extendNameEnv mapToTyThing n) kind
61
+ | otherwise = pure mapToTyThing
62
62
names = rights $ S. toList idents
63
63
idents = M. keysSet rm
64
64
mod = tcg_mod this_mod
You can’t perform that action at this time.
0 commit comments