diff options
Diffstat (limited to 'src/HaddockHtml.hs')
-rw-r--r-- | src/HaddockHtml.hs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/HaddockHtml.hs b/src/HaddockHtml.hs index 9c3be7b3..6a9f193e 100644 --- a/src/HaddockHtml.hs +++ b/src/HaddockHtml.hs @@ -383,6 +383,7 @@ ifaceToHtml _ iface exports = numberSectionHeadings (iface_exports iface) has_doc (ExportDecl _ d _) = isJust (declDoc d) + has_doc (ExportNoDecl _ _ _) = False has_doc (ExportModule _) = False has_doc _ = True @@ -399,8 +400,6 @@ ifaceToHtml _ iface -- omit the synopsis if there are no documentation annotations at all synopsis - | no_doc_at_all = Html.emptyTable - | otherwise = (tda [theclass "section1"] << toHtml "Synopsis") </> s15 </> (tda [theclass "body"] << vanillaTable << @@ -411,14 +410,15 @@ ifaceToHtml _ iface -- if the documentation doesn't begin with a section header, then -- add one ("Documentation"). maybe_doc_hdr - | not (no_doc_at_all) = + | no_doc_at_all = Html.emptyTable + | otherwise = case exports of [] -> Html.emptyTable ExportGroup _ _ _ : _ -> Html.emptyTable _ -> tda [ theclass "section1" ] << toHtml "Documentation" - | otherwise = Html.emptyTable - bdy = map (processExport False) exports + bdy | no_doc_at_all = [] + | otherwise = map (processExport False) exports ppModuleContents :: [ExportItem] -> HtmlTable ppModuleContents exports @@ -459,6 +459,10 @@ processExport _ (ExportGroup lev id0 doc) = ppDocGroup lev (namedAnchor id0 << docToHtml doc) processExport summary (ExportDecl x decl insts) = doDecl summary x decl insts +processExport summmary (ExportNoDecl _ y []) + = declBox (ppHsQName y) +processExport summmary (ExportNoDecl _ y subs) + = declBox (ppHsQName y <+> parenList (map ppHsQName subs)) processExport _ (ExportDoc doc) = docBox (docToHtml doc) processExport _ (ExportModule (Module mdl)) |