From 978934427bcef5cffd588424fe8ffe43ebad1250 Mon Sep 17 00:00:00 2001 From: davve Date: Sun, 4 Feb 2007 16:26:00 +0000 Subject: Render infix data constructors --- src/HaddockHtml.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/HaddockHtml.hs') 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" -- cgit v1.2.3