Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
5451c866
Commit
5451c866
authored
Jun 18, 2002
by
simonpj
Browse files
[project @ 2002-06-18 08:05:44 by simonpj]
Wibble on printing outmost parens
parent
44c2d766
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/hsSyn/HsTypes.lhs
View file @
5451c866
...
...
@@ -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]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment