Commit 7dfbed23 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Fix pretty-printing for GADTs in infix form

parent ab2fe555
...@@ -800,9 +800,10 @@ pprConDecl (ConDecl { con_name = con, con_explicit = expl, con_qvars = tvs ...@@ -800,9 +800,10 @@ pprConDecl (ConDecl { con_name = con, con_explicit = expl, con_qvars = tvs
= sep [ppr con <+> dcolon <+> pprHsForAll expl tvs cxt, = sep [ppr con <+> dcolon <+> pprHsForAll expl tvs cxt,
pprConDeclFields fields <+> arrow <+> ppr res_ty] pprConDeclFields fields <+> arrow <+> ppr res_ty]
pprConDecl (ConDecl {con_name = con, con_details = InfixCon {}, con_res = ResTyGADT {} }) pprConDecl decl@(ConDecl { con_details = InfixCon ty1 ty2, con_res = ResTyGADT {} })
= pprPanic "pprConDecl" (ppr con) = pprConDecl (decl { con_details = PrefixCon [ty1,ty2] })
-- In GADT syntax we don't allow infix constructors -- 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} \end{code}
%************************************************************************ %************************************************************************
......
Markdown is supported
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