aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Backends
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2017-03-22 13:48:12 -0700
committerBen Gamari <ben@smart-cactus.org>2017-03-23 17:20:08 -0400
commitef93eaac9bc0ca40073763d2e18ced3a51679ead (patch)
treecfa55abdf1f93e17411ad5488dcb0a1fd87829f0 /haddock-api/src/Haddock/Backends
parente3568da479b6297e48b8b83ee067174717fdbe22 (diff)
Annotate signature docs with (signature)
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> (cherry picked from commit 07b88c5d4e79b87a319fbb08f8ea01dbb41063c1)
Diffstat (limited to 'haddock-api/src/Haddock/Backends')
-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 34911b11..fc26afbb 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml.hs
@@ -482,13 +482,16 @@ ppHtmlModule odir doctitle themes
mdl = ifaceMod iface
aliases = ifaceModuleAliases iface
mdl_str = moduleString mdl
+ mdl_str_annot = mdl_str ++ if ifaceIsSig iface
+ then " (signature)"
+ else ""
real_qual = makeModuleQual qual aliases mdl
html =
- headHtml mdl_str (Just $ "mini_" ++ moduleHtmlFile mdl) themes maybe_mathjax_url +++
+ headHtml mdl_str_annot (Just $ "mini_" ++ moduleHtmlFile mdl) themes maybe_mathjax_url +++
bodyHtml doctitle (Just iface)
maybe_source_url maybe_wiki_url
maybe_contents_url maybe_index_url << [
- divModuleHeader << (moduleInfo iface +++ (sectionName << mdl_str)),
+ divModuleHeader << (moduleInfo iface +++ (sectionName << mdl_str_annot)),
ifaceToHtml maybe_source_url maybe_wiki_url iface unicode real_qual
]