From f93641d6fe818667bde3215364b9cb2de9a4dc41 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 29 May 2002 15:27:18 +0000 Subject: [haddock @ 2002-05-29 15:27:18 by simonmar] Include the instances in abstract data types too --- src/HaddockHtml.hs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/HaddockHtml.hs b/src/HaddockHtml.hs index ee5db5fd..29023524 100644 --- a/src/HaddockHtml.hs +++ b/src/HaddockHtml.hs @@ -476,12 +476,6 @@ ppShortDataDecl summary is_newty ) where do_constr c con = declBox (toHtml [c] <+> ppShortConstr summary con) --- First, the abstract case: - -ppHsDataDecl summary inst_maps is_newty x - (HsDataDecl loc ctx nm args [] drv doc) = - declWithDoc summary doc (ppHsDataHeader summary is_newty nm args) - -- The rest of the cases: ppHsDataDecl summary (_, ty_inst_map) is_newty @@ -492,8 +486,7 @@ ppHsDataDecl summary (_, ty_inst_map) is_newty = header tda [theclass "body"] << vanillaTable << ( datadoc - constr_hdr - (tda [theclass "body"] << constr_table << constrs) + constr_bit instances_bit ) where @@ -506,8 +499,13 @@ ppHsDataDecl summary (_, ty_inst_map) is_newty datadoc | isJust doc = ndocBox (docToHtml (fromJust doc)) | otherwise = Html.emptyTable - constrs | null cons = Html.emptyTable - | otherwise = aboves (map ppSideBySideConstr cons) + constr_bit + | null cons = Html.emptyTable + | otherwise = + constr_hdr + (tda [theclass "body"] << constr_table << + aboves (map ppSideBySideConstr cons) + ) no_constr_docs = all constr_has_no_doc cons -- cgit v1.2.3