[commit: haddock] alexbiehl-patch-1, ghc-head, ghc-head1, headdock-library-1.4.5, ie_avails, master, pr-filter-maps, pr/cabal-desc, travis, v2.18, wip/T14529, wip/remove-frames, wip/remove-frames1, wip/revert-ttg-2017-11-20, wip/ttg-2017-10-13, wip/ttg-2017-10-31, wip/ttg-2017-11-06, wip/ttg2-2017-11-10, wip/ttg3-2017-11-12, wip/ttg4-constraints-2017-11-13, wip/ttg6-unrevert-2017-11-22: Annotate signature docs with (signature) (ef93eaa)

git at git.haskell.org git at git.haskell.org
Tue Nov 28 11:50:07 UTC 2017


Repository : ssh://git@git.haskell.org/haddock

On branches: alexbiehl-patch-1,ghc-head,ghc-head1,headdock-library-1.4.5,ie_avails,master,pr-filter-maps,pr/cabal-desc,travis,v2.18,wip/T14529,wip/remove-frames,wip/remove-frames1,wip/revert-ttg-2017-11-20,wip/ttg-2017-10-13,wip/ttg-2017-10-31,wip/ttg-2017-11-06,wip/ttg2-2017-11-10,wip/ttg3-2017-11-12,wip/ttg4-constraints-2017-11-13,wip/ttg6-unrevert-2017-11-22
Link       : http://git.haskell.org/haddock.git/commitdiff/ef93eaac9bc0ca40073763d2e18ced3a51679ead

>---------------------------------------------------------------

commit ef93eaac9bc0ca40073763d2e18ced3a51679ead
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Wed Mar 22 13:48:12 2017 -0700

    Annotate signature docs with (signature)
    
    Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>
    (cherry picked from commit 07b88c5d4e79b87a319fbb08f8ea01dbb41063c1)


>---------------------------------------------------------------

ef93eaac9bc0ca40073763d2e18ced3a51679ead
 haddock-api/src/Haddock/Backends/Xhtml.hs | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/haddock-api/src/Haddock/Backends/Xhtml.hs b/haddock-api/src/Haddock/Backends/Xhtml.hs
index 34911b1..fc26afb 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
           ]
 



More information about the ghc-commits mailing list