diff options
author | Hécate Moonlight <Kleidukos@users.noreply.github.com> | 2021-02-07 16:18:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-07 16:18:10 +0100 |
commit | a10d042ac76c990764250244ac801db16858b6ee (patch) | |
tree | 40f8bc9066d9d96fa00163b10ac85d7645ad01d2 /haddock-api/src/Haddock/Backends/Xhtml/Names.hs | |
parent | a2f9f297d17059b3fc68ce4a245702278a5d8340 (diff) | |
parent | c31c156422785751e33c9a7a4f021ac8da77d364 (diff) |
Merge pull request #1319 from alexbiehl/alex/compat
Backward compat: Add support for labeled module references
Diffstat (limited to 'haddock-api/src/Haddock/Backends/Xhtml/Names.hs')
-rw-r--r-- | haddock-api/src/Haddock/Backends/Xhtml/Names.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Names.hs b/haddock-api/src/Haddock/Backends/Xhtml/Names.hs index 8553cdfb..b324fa38 100644 --- a/haddock-api/src/Haddock/Backends/Xhtml/Names.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml/Names.hs @@ -186,9 +186,12 @@ ppModule mdl = anchor ! [href (moduleUrl mdl)] << toHtml (moduleString mdl) -ppModuleRef :: ModuleName -> String -> Html -ppModuleRef mdl ref = anchor ! [href (moduleHtmlFile' mdl ++ ref)] - << toHtml (moduleNameString mdl) +ppModuleRef :: Maybe Html -> ModuleName -> String -> Html +ppModuleRef Nothing mdl ref = anchor ! [href (moduleHtmlFile' mdl ++ ref)] + << toHtml (moduleNameString mdl) +ppModuleRef (Just lbl) mdl ref = anchor ! [href (moduleHtmlFile' mdl ++ ref)] + << lbl + -- NB: The ref parameter already includes the '#'. -- This function is only called from markupModule expanding a -- DocModule, which doesn't seem to be ever be used. |