summaryrefslogtreecommitdiff
path: root/src/Language/PureScript/Docs/Types.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Language/PureScript/Docs/Types.hs')
-rw-r--r--src/Language/PureScript/Docs/Types.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Language/PureScript/Docs/Types.hs b/src/Language/PureScript/Docs/Types.hs
index f18648b..e69eb87 100644
--- a/src/Language/PureScript/Docs/Types.hs
+++ b/src/Language/PureScript/Docs/Types.hs
@@ -397,8 +397,9 @@ data LinkLocation
| BuiltinModule P.ModuleName
deriving (Show, Eq, Ord)
--- | Given a links context, a thing to link to (either a value or a type), and
--- its containing module, attempt to create a DocLink.
+-- | Given a links context, the current module name, the namespace of a thing
+-- to link to, its title, and its containing module, attempt to create a
+-- DocLink.
getLink :: LinksContext -> P.ModuleName -> Namespace -> Text -> ContainingModule -> Maybe DocLink
getLink LinksContext{..} curMn namespace target containingMod = do
location <- getLinkLocation
@@ -409,7 +410,7 @@ getLink LinksContext{..} curMn namespace target containingMod = do
}
where
- getLinkLocation = normalLinkLocation <|> builtinLinkLocation
+ getLinkLocation = builtinLinkLocation <|> normalLinkLocation
normalLinkLocation = do
case containingMod of