File tree 2 files changed +10
-9
lines changed
ghcide/src/Development/IDE
2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -991,11 +991,12 @@ mkDetailsFromIface session iface linkable = do
991
991
initIfaceLoad hsc' (typecheckIface iface)
992
992
return (HomeModInfo iface details linkable)
993
993
994
- fakeSpan :: RealSrcSpan
995
- fakeSpan = realSrcLocSpan $ mkRealSrcLoc (Util. fsLit " <ghcide>" ) 1 1
996
-
997
994
initTypecheckEnv :: HscEnv -> Module -> TcRn r -> IO (Messages , Maybe r )
998
995
initTypecheckEnv hsc_env mod = initTc hsc_env HsSrcFile False mod fakeSpan
996
+ where
997
+ fakeSpan :: RealSrcSpan
998
+ fakeSpan = realSrcLocSpan $ mkRealSrcLoc (Util. fsLit " <ghcide>" ) 1 1
999
+
999
1000
1000
1001
getDocsNonInteractive'
1001
1002
:: Name
Original file line number Diff line number Diff line change @@ -44,16 +44,16 @@ mkDocMap env rm this_mod =
44
44
k <- foldrM getType (tcg_type_env this_mod) names
45
45
pure $ DKMap d k
46
46
where
47
- getDocs n map
48
- | maybe True (mod == ) $ nameModule_maybe n = pure map -- we already have the docs in this_docs, or they do not exist
47
+ getDocs n mapToSpanDoc
48
+ | maybe True (mod == ) $ nameModule_maybe n = pure mapToSpanDoc -- we already have the docs in this_docs, or they do not exist
49
49
| otherwise = do
50
50
doc <- getDocumentationTryGhc env mod n
51
- pure $ extendNameEnv map n doc
52
- getType n map
51
+ pure $ extendNameEnv mapToSpanDoc n doc
52
+ getType n mapToTyThing
53
53
| isTcOcc $ occName n = do
54
54
kind <- lookupKind env mod n
55
- pure $ maybe map (extendNameEnv map n) kind
56
- | otherwise = pure map
55
+ pure $ maybe mapToTyThing (extendNameEnv mapToTyThing n) kind
56
+ | otherwise = pure mapToTyThing
57
57
names = rights $ S. toList idents
58
58
idents = M. keysSet rm
59
59
mod = tcg_mod this_mod
You can’t perform that action at this time.
0 commit comments