diff options
author | Mark Lentczner <markl@glyphic.com> | 2010-04-25 04:56:37 +0000 |
---|---|---|
committer | Mark Lentczner <markl@glyphic.com> | 2010-04-25 04:56:37 +0000 |
commit | 40c87f79ff5e34efb4bffa306f328a5ad28a232e (patch) | |
tree | f05e90ef3964eec37603a8b1aa92c1446bea56b6 /src | |
parent | 62f2d121a7217b78ae1c20a32519550b0ebc88c8 (diff) |
made record fields be an unordList, not a table
Diffstat (limited to 'src')
-rw-r--r-- | src/Haddock/Backends/Xhtml/Decl.hs | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/Haddock/Backends/Xhtml/Decl.hs b/src/Haddock/Backends/Xhtml/Decl.hs index d7b463df..34d509f8 100644 --- a/src/Haddock/Backends/Xhtml/Decl.hs +++ b/src/Haddock/Backends/Xhtml/Decl.hs @@ -428,8 +428,8 @@ ppShortDataDecl summary _links _loc dataDecl unicode | [] <- cons = declElem dataHeader - | [lcon] <- cons, ResTyH98 <- resTy = declElem $ - dataHeader <+> equals <+> ppShortConstr summary (unLoc lcon) unicode + | [lcon] <- cons, ResTyH98 <- resTy = declElem (dataHeader <+> equals) + <+> ppShortConstr summary (unLoc lcon) unicode | ResTyH98 <- resTy = declElem dataHeader +++ unordList (zipWith doConstr ('=':repeat '|') cons) @@ -439,8 +439,8 @@ ppShortDataDecl summary _links _loc dataDecl unicode where dataHeader = ppDataHeader summary dataDecl unicode - doConstr c con = declElem (toHtml [c] <+> ppShortConstr summary (unLoc con) unicode) - doGADTConstr con = declElem (ppShortConstr summary (unLoc con) unicode) + doConstr c con = toHtml [c] <+> ppShortConstr summary (unLoc con) unicode + doGADTConstr con = ppShortConstr summary (unLoc con) unicode cons = tcdCons dataDecl resTy = (con_res . unLoc . head) cons @@ -525,8 +525,7 @@ ppShortConstr summary con unicode = case con_res con of InfixCon arg1 arg2 -> doGADTCon [arg1, arg2] resTy where - doRecordFields fields = braces (vanillaTable << - aboves (map (ppShortField summary unicode) fields)) + doRecordFields fields = braces $ unordList (map (ppShortField summary unicode) fields) doGADTCon args resTy = ppBinder summary occ <+> dcolon unicode <+> hsep [ ppForAll forall ltvs lcontext unicode, ppLType unicode (foldr mkFunTy resTy args) ] @@ -613,12 +612,10 @@ ppSideBySideField subdocs unicode (ConDeclField (L _ name) ltype _) = mbDoc = join $ fmap fst $ lookup name subdocs -ppShortField :: Bool -> Bool -> ConDeclField DocName -> HtmlTable +ppShortField :: Bool -> Bool -> ConDeclField DocName -> Html ppShortField summary unicode (ConDeclField (L _ name) ltype _) - = tda [theclass "recfield"] << ( - ppBinder summary (docNameOcc name) - <+> dcolon unicode <+> ppLType unicode ltype - ) + = ppBinder summary (docNameOcc name) + <+> dcolon unicode <+> ppLType unicode ltype -- | Print the LHS of a data\/newtype declaration. |