aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock
diff options
context:
space:
mode:
Diffstat (limited to 'haddock-api/src/Haddock')
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml.hs15
1 files changed, 14 insertions, 1 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml.hs b/haddock-api/src/Haddock/Backends/Xhtml.hs
index 65b427f9..34911b11 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml.hs
@@ -263,13 +263,20 @@ ppHtmlContents dflags odir doctitle _maybe_package
themes mathjax_url maybe_index_url
maybe_source_url maybe_wiki_url ifaces showPkgs prologue debug qual = do
let tree = mkModuleTree dflags showPkgs
- [(instMod iface, toInstalledDescription iface) | iface <- ifaces]
+ [(instMod iface, toInstalledDescription iface)
+ | iface <- ifaces
+ , not (instIsSig iface)]
+ sig_tree = mkModuleTree dflags showPkgs
+ [(instMod iface, toInstalledDescription iface)
+ | iface <- ifaces
+ , instIsSig iface]
html =
headHtml doctitle Nothing themes mathjax_url +++
bodyHtml doctitle Nothing
maybe_source_url maybe_wiki_url
Nothing maybe_index_url << [
ppPrologue qual doctitle prologue,
+ ppSignatureTree qual sig_tree,
ppModuleTree qual tree
]
createDirectoryIfMissing True odir
@@ -282,7 +289,13 @@ ppPrologue qual title (Just doc) =
divDescription << (h1 << title +++ docElement thediv (rdrDocToHtml qual doc))
+ppSignatureTree :: Qualification -> [ModuleTree] -> Html
+ppSignatureTree qual ts =
+ divModuleList << (sectionName << "Signatures" +++ mkNodeList qual [] "n" ts)
+
+
ppModuleTree :: Qualification -> [ModuleTree] -> Html
+ppModuleTree _ [] = mempty
ppModuleTree qual ts =
divModuleList << (sectionName << "Modules" +++ mkNodeList qual [] "n" ts)