diff options
author | davve <davve@dtek.chalmers.se> | 2007-02-04 16:26:00 +0000 |
---|---|---|
committer | davve <davve@dtek.chalmers.se> | 2007-02-04 16:26:00 +0000 |
commit | 978934427bcef5cffd588424fe8ffe43ebad1250 (patch) | |
tree | 9f105fdcc34909038898ce14012a32d91e1026dd | |
parent | 4dd150fe66a1c6d56569793af6d1d4c1a58daf68 (diff) |
Render infix data constructors
-rw-r--r-- | src/HaddockHtml.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/HaddockHtml.hs b/src/HaddockHtml.hs index e01499dd..2af6922d 100644 --- a/src/HaddockHtml.hs +++ b/src/HaddockHtml.hs @@ -970,6 +970,8 @@ ppShortConstr summary con = case con_res con of PrefixCon args -> header +++ hsep (ppBinder summary name : map ppLType args) RecCon fields -> header +++ ppBinder summary name <+> braces (vanillaTable << aboves (map (ppShortField summary) fields)) + InfixCon arg1 arg2 -> header +++ + hsep [ppLType arg1, ppBinder summary name, ppLType arg2] ResTyGADT resTy -> case con_details con of PrefixCon args -> ppName name <+> dcolon <+> hsep [ @@ -1000,12 +1002,16 @@ ppSideBySideConstr (L _ con) = case con_res con of ResTyH98 -> case con_details con of PrefixCon args -> argBox (hsep ((header +++ - ppBinder False name) : map ppLType args)) <-> + ppBinder False name) : map ppLType args)) <-> maybeRDocBox mbLDoc RecCon fields -> argBox (header +++ ppBinder False name) <-> maybeRDocBox mbLDoc </> (tda [theclass "body"] << spacedTable1 << aboves (map ppSideBySideField fields)) + InfixCon arg1 arg2 -> argBox (hsep + [header +++ ppLType arg1, ppBinder False name, + ppLType arg2]) + <-> maybeRDocBox mbLDoc ResTyGADT ltype -> emptyTable --error "GADTs not supported yet" |