Commit 5451c866 authored by simonpj's avatar simonpj
Browse files

[project @ 2002-06-18 08:05:44 by simonpj]

Wibble on printing outmost parens
parent 44c2d766
......@@ -302,9 +302,13 @@ maybeParen ctxt_prec op_prec p | ctxt_prec >= op_prec = parens p
pprHsType, pprParendHsType :: (Outputable name) => HsType name -> SDoc
pprHsType ty = ppr_mono_ty pREC_TOP ty
pprHsType ty = ppr_mono_ty pREC_TOP (de_paren ty)
pprParendHsType ty = ppr_mono_ty pREC_CON ty
-- Remove outermost HsParTy parens before printing a type
de_paren (HsParTy ty) = de_paren ty
de_paren ty = ty
ppr_mono_ty ctxt_prec (HsForAllTy maybe_tvs ctxt ty)
= maybeParen ctxt_prec pREC_FUN $
sep [pp_header, pprHsType ty]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment