aboutsummaryrefslogtreecommitdiff
path: root/src/HaddockHtml.hs
diff options
context:
space:
mode:
authordavve <davve@dtek.chalmers.se>2007-02-04 16:26:00 +0000
committerdavve <davve@dtek.chalmers.se>2007-02-04 16:26:00 +0000
commit978934427bcef5cffd588424fe8ffe43ebad1250 (patch)
tree9f105fdcc34909038898ce14012a32d91e1026dd /src/HaddockHtml.hs
parent4dd150fe66a1c6d56569793af6d1d4c1a58daf68 (diff)
Render infix data constructors
Diffstat (limited to 'src/HaddockHtml.hs')
-rw-r--r--src/HaddockHtml.hs8
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"