diff options
author | simonmar <unknown> | 2003-11-11 12:10:44 +0000 |
---|---|---|
committer | simonmar <unknown> | 2003-11-11 12:10:44 +0000 |
commit | 3acbf818ee3ad033e9e13a5fea56fa7a76cfaf04 (patch) | |
tree | 720f8ef9b22e4b0c4b6311bc08162b13306f3c70 /src/HaddockHtml.hs | |
parent | ca62408db8a42a484e33fc13dc79b3e81f9a3dca (diff) |
[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.
Diffstat (limited to 'src/HaddockHtml.hs')
-rw-r--r-- | src/HaddockHtml.hs | 9 |
1 files changed, 4 insertions, 5 deletions
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 |