Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
7dfbed23
Commit
7dfbed23
authored
Aug 28, 2012
by
Simon Peyton Jones
Browse files
Fix pretty-printing for GADTs in infix form
parent
ab2fe555
Changes
1
Show whitespace changes
Inline
Side-by-side
compiler/hsSyn/HsDecls.lhs
View file @
7dfbed23
...
...
@@ -800,9 +800,10 @@ pprConDecl (ConDecl { con_name = con, con_explicit = expl, con_qvars = tvs
= sep [ppr con <+> dcolon <+> pprHsForAll expl tvs cxt,
pprConDeclFields fields <+> arrow <+> ppr res_ty]
pprConDecl (ConDecl {
con_name = con,
con_details = InfixCon
{}
, con_res = ResTyGADT {} })
=
pprPanic "
pprConDecl
"
(
ppr con
)
pprConDecl
decl@
(ConDecl { con_details = InfixCon
ty1 ty2
, con_res = ResTyGADT {} })
= pprConDecl (
decl { con_details = PrefixCon [ty1,ty2] }
)
-- In GADT syntax we don't allow infix constructors
-- but the renamer puts them in this form (Note [Infix GADT constructors] in RnSource)
\end{code}
%************************************************************************
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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