aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Backends/Html.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Haddock/Backends/Html.hs')
-rw-r--r--src/Haddock/Backends/Html.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Haddock/Backends/Html.hs b/src/Haddock/Backends/Html.hs
index 9d7759b4..2413863a 100644
--- a/src/Haddock/Backends/Html.hs
+++ b/src/Haddock/Backends/Html.hs
@@ -562,7 +562,9 @@ ifaceToHtml maybe_source_url maybe_wiki_url iface
no_doc_at_all = not (any has_doc exports)
- contents = td << vanillaTable << ppModuleContents exports
+ contents = case ppModuleContents exports of
+ Nothing -> []
+ Just x -> [td << vanillaTable << x]
description
= case ifaceRnDoc iface of
@@ -593,7 +595,7 @@ ifaceToHtml maybe_source_url maybe_wiki_url iface
linksInfo = (maybe_source_url, maybe_wiki_url, iface)
-ppModuleContents :: [ExportItem] -> HtmlTable
+ppModuleContents :: [ExportItem DocName] -> Maybe HtmlTable
ppModuleContents exports
| length sections == 0 = Nothing
| otherwise = Just (tda [theclass "section4"] << bold << toHtml "Contents"