aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Backends
diff options
context:
space:
mode:
authorDavid Waern <davve@dtek.chalmers.se>2007-12-08 16:26:12 +0000
committerDavid Waern <davve@dtek.chalmers.se>2007-12-08 16:26:12 +0000
commitdbaf61e7fe3de11aa10e8dd62341888e497f0b39 (patch)
tree57fa087ef2e2c6151a6b0320b7ca9475abfb6ec5 /src/Haddock/Backends
parent51ff000cad60d81cc73c203e95b21d98fbf82628 (diff)
Use ppParendType when printing types args in predicates
Diffstat (limited to 'src/Haddock/Backends')
-rw-r--r--src/Haddock/Backends/Html.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Haddock/Backends/Html.hs b/src/Haddock/Backends/Html.hs
index 8c6a82db..f00a8f04 100644
--- a/src/Haddock/Backends/Html.hs
+++ b/src/Haddock/Backends/Html.hs
@@ -775,13 +775,13 @@ ppLPred = ppPred . unLoc
ppPred (HsClassP n ts)
- | classOp, length ts > 2 = firstApp <+> ppLTypes rest
+ | classOp, length ts > 2 = firstApp <+> ppLParendTypes rest
| classOp = firstApp
- | otherwise = ppDocName n <+> ppLTypes ts
+ | otherwise = ppDocName n <+> ppLParendTypes ts
where
- classOp = isNameConSym . getName $ n
+ classOp = isNameConSym . getName $ n
t1:t2:rest = ts
- firstApp = ppLType t1 <+> ppDocName n <+> ppLType t2
+ firstApp = ppLParendType t1 <+> ppDocName n <+> ppLParendType t2
-- TODO: find out what happened to the Dupable/Linear distinction
@@ -1237,6 +1237,7 @@ ppLParendType = ppParendType . unLoc
ppType ty = ppr_mono_ty pREC_TOP (prepare ty)
ppParendType ty = ppr_mono_ty pREC_CON ty
+
-- Before printing a type
-- (a) Remove outermost HsParTy parens
-- (b) Drop top-level for-all type variables in user style