summaryrefslogtreecommitdiff
path: root/ghc/compiler/coreSyn/PprExternalCore.lhs
diff options
context:
space:
mode:
Diffstat (limited to 'ghc/compiler/coreSyn/PprExternalCore.lhs')
-rw-r--r--ghc/compiler/coreSyn/PprExternalCore.lhs5
1 files changed, 4 insertions, 1 deletions
diff --git a/ghc/compiler/coreSyn/PprExternalCore.lhs b/ghc/compiler/coreSyn/PprExternalCore.lhs
index 871f43cb43..dbcc86d153 100644
--- a/ghc/compiler/coreSyn/PprExternalCore.lhs
+++ b/ghc/compiler/coreSyn/PprExternalCore.lhs
@@ -56,6 +56,8 @@ ptdef (Newtype tcon tbinds rep ) =
pcdef (Constr dcon tbinds tys) =
(pname dcon) <+> (sep [hsep (map pattbind tbinds),sep (map paty tys)])
+pcdef (GadtConstr dcon ty) =
+ (pname dcon) <+> text "::" <+> pty ty
pname id = text id
@@ -123,7 +125,8 @@ pappexp e as = fsep (paexp e : map pa as)
pexp (Lam b e) = char '\\' <+> plamexp [b] e
pexp (Let vd e) = (text "%let" <+> pvdefg vd) $$ (text "%in" <+> pexp e)
-pexp (Case e vb alts) = sep [text "%case" <+> paexp e,
+-- gaw 2004
+pexp (Case e vb ty alts) = sep [text "%case" <+> parens (paty ty) <+> paexp e,
text "%of" <+> pvbind vb]
$$ (indent (braces (vcat (punctuate (char ';') (map palt alts)))))
pexp (Coerce t e) = (text "%coerce" <+> paty t) $$ pexp e