diff options
author | simonmar <unknown> | 2002-05-29 15:27:18 +0000 |
---|---|---|
committer | simonmar <unknown> | 2002-05-29 15:27:18 +0000 |
commit | f93641d6fe818667bde3215364b9cb2de9a4dc41 (patch) | |
tree | b944c1eca46af3e150589ee7572857c7cc11661a /src/HaddockHtml.hs | |
parent | b33335263d27d63b7feffeca3059d89bf2964620 (diff) |
[haddock @ 2002-05-29 15:27:18 by simonmar]
Include the instances in abstract data types too
Diffstat (limited to 'src/HaddockHtml.hs')
-rw-r--r-- | src/HaddockHtml.hs | 18 |
1 files changed, 8 insertions, 10 deletions
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 |