aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Backends/Xhtml/Names.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-02-08 12:54:33 -0500
committerBen Gamari <ben@smart-cactus.org>2021-02-08 12:54:33 -0500
commite57d82dde105ffbfcb27ab261041c97b4dd0150a (patch)
treee4716c076ef5f05d63235bbf475f939fa1ed402f /haddock-api/src/Haddock/Backends/Xhtml/Names.hs
parentb995bfe84f9766e23ff78d7ccd520ec7d8cdbebc (diff)
parent4f1a309700106b62831309931e449a603093f521 (diff)
Merge remote-tracking branch 'upstream/ghc-head' into ghc-head
Diffstat (limited to 'haddock-api/src/Haddock/Backends/Xhtml/Names.hs')
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/Names.hs9
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.