From 3acbf818ee3ad033e9e13a5fea56fa7a76cfaf04 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 11 Nov 2003 12:10:44 +0000 Subject: [haddock @ 2003-11-11 12:10:44 by simonmar] Go back to producing just the documentation section, rather than just the synopsis section, for a module with no documentation annotations. One reason is that the synopsis section tries to link each entity to its documentation on the same page. Also, the doc section anchors each entity, and it lists instances which the synopsis doesn't. --- src/HaddockHtml.hs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/HaddockHtml.hs b/src/HaddockHtml.hs index 9d424581..d0e8d5e5 100644 --- a/src/HaddockHtml.hs +++ b/src/HaddockHtml.hs @@ -400,6 +400,8 @@ 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 << @@ -410,15 +412,12 @@ ifaceToHtml _ iface -- if the documentation doesn't begin with a section header, then -- add one ("Documentation"). maybe_doc_hdr - | no_doc_at_all = Html.emptyTable - | otherwise = - case exports of + = case exports of [] -> Html.emptyTable ExportGroup _ _ _ : _ -> Html.emptyTable _ -> tda [ theclass "section1" ] << toHtml "Documentation" - bdy | no_doc_at_all = [] - | otherwise = map (processExport False) exports + bdy = map (processExport False) exports ppModuleContents :: [ExportItem] -> HtmlTable ppModuleContents exports -- cgit v1.2.3