aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2017-04-22 20:38:26 -0700
committerAlex Biehl <alexbiehl@gmail.com>2017-04-25 17:02:20 +0200
commitce3647ea278606f43615817ecb2865d96ca8b39e (patch)
treef940316f433fbbc2be4668e9cc7ee5b57127ac14
parent968045e574783fe8bdde7afbb825d4dcd82ae0e7 (diff)
Render (signature) only if it actually is a signature!
I forgot a conditional, oops! Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> (cherry picked from commit a0c4790e15a2d3fab8d830eee8fcd639fe6d39c9)
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml.hs b/haddock-api/src/Haddock/Backends/Xhtml.hs
index c5caa6a2..31a748cb 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml.hs
@@ -485,10 +485,13 @@ ppHtmlModule odir doctitle themes
mdl_str_annot = mdl_str ++ if ifaceIsSig iface
then " (signature)"
else ""
- mdl_str_linked = mdl_str +++
- " (signature" +++
+ mdl_str_linked
+ | ifaceIsSig iface
+ = mdl_str +++ " (signature" +++
sup << ("[" +++ anchor ! [href signatureDocURL] << "?" +++ "]" ) +++
")"
+ | otherwise
+ = toHtml mdl_str
real_qual = makeModuleQual qual aliases mdl
html =
headHtml mdl_str_annot (Just $ "mini_" ++ moduleHtmlFile mdl) themes maybe_mathjax_url +++