You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -102,10 +104,19 @@ getDocumentationsTryGhc env linkToHackage names = do
102
104
doc <- lookupDocHtmlForModule env mod
103
105
src <- lookupSrcHtmlForModule env mod
104
106
-- If found, the local files are used as hints for the hackage links, this helps with symbols defined in an internal module but re-exported by another.
105
-
if linkToHackage
106
-
thenreturn ( toHackageDocUriText env mod (takeFileName <$> doc)
107
-
, toHackageSrcUriText env mod (takeFileName <$> src))
108
-
elsepure (toFileUriText doc, toFileUriText src)
107
+
let
108
+
LinkTargets{linkDoc,linkSource} = linkTgts
109
+
doc_link =case linkDoc of
110
+
LinkToHackage->
111
+
toHackageDocUriText env mod (takeFileName <$> doc)
112
+
LinkToLocal->
113
+
toFileUriText doc
114
+
src_link =case linkSource of
115
+
LinkToHackage->
116
+
toHackageSrcUriText env mod (takeFileName <$> src)
117
+
LinkToLocal->
118
+
toFileUriText src
119
+
pure (doc_link, src_link)
109
120
Nothing->pure (Nothing, Nothing)
110
121
111
122
let docUri = (<>"#"<> selector <> printOutputable name) <$> docFu
0 commit comments