aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Backends/Xhtml/Decl.hs
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2014-02-23 15:37:13 +0100
committerNiklas Haas <git@nand.wakku.to>2014-02-23 15:37:13 +0100
commit64850ca4f7dc2ca0fdb21d078d93cd636de5c87a (patch)
tree294c6f3115b29620ed7b4cd9bf3b5a5f93a5c289 /src/Haddock/Backends/Xhtml/Decl.hs
parent14531f7838c5abd0ba2aaf5217a477194d7b1897 (diff)
Lower precedence of equality constraints
This drops them to the new precedence pREC_CTX, which makes single eqaulity constraints show up as (a ~ b) => ty, in line with GHC's rendering. Additional tests added to make sure other type operators render as intended. Current behavior matches GHC
Diffstat (limited to 'src/Haddock/Backends/Xhtml/Decl.hs')
-rw-r--r--src/Haddock/Backends/Xhtml/Decl.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Haddock/Backends/Xhtml/Decl.hs b/src/Haddock/Backends/Xhtml/Decl.hs
index 427d5670..2ecde081 100644
--- a/src/Haddock/Backends/Xhtml/Decl.hs
+++ b/src/Haddock/Backends/Xhtml/Decl.hs
@@ -750,7 +750,7 @@ ppr_mono_ty _ (HsExplicitTupleTy _ tys) u q = quote $ parenList $ map (p
ppr_mono_ty _ (HsWrapTy {}) _ _ = error "ppr_mono_ty HsWrapTy"
ppr_mono_ty ctxt_prec (HsEqTy ty1 ty2) unicode qual
- = maybeParen ctxt_prec pREC_OP $
+ = maybeParen ctxt_prec pREC_CTX $
ppr_mono_lty pREC_OP ty1 unicode qual <+> char '~' <+> ppr_mono_lty pREC_OP ty2 unicode qual
ppr_mono_ty ctxt_prec (HsAppTy fun_ty arg_ty) unicode qual