diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-08-28 13:36:17 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-08-28 13:36:17 +0100 |
commit | 7dfbed230ceab5b25cc75a0c42bfc94aa918a1bf (patch) | |
tree | beaa9e96d99a426d22e7ce19ed91d3c97ab026b3 /compiler/hsSyn | |
parent | ab2fe55573499d5fa3d993a018206a02b91d651a (diff) | |
download | haskell-7dfbed230ceab5b25cc75a0c42bfc94aa918a1bf.tar.gz |
Fix pretty-printing for GADTs in infix form
Diffstat (limited to 'compiler/hsSyn')
-rw-r--r-- | compiler/hsSyn/HsDecls.lhs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/hsSyn/HsDecls.lhs b/compiler/hsSyn/HsDecls.lhs index bac9ec6348..cd19e4c89b 100644 --- a/compiler/hsSyn/HsDecls.lhs +++ b/compiler/hsSyn/HsDecls.lhs @@ -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} %************************************************************************ |