Commit 2d4b82a0 authored by simonpj@microsoft.com's avatar simonpj@microsoft.com
Browse files

Show types of case result when debug is on

parent 3972d4fc
......@@ -154,8 +154,8 @@ ppr_expr add_par expr@(App fun arg)
ppr_expr add_par (Case expr var ty [(con,args,rhs)])
= add_par $
sep [sep [ptext SLIT("case") {- <+> pprParendType ty -} <+> pprCoreExpr expr,
-- Printing the result type is excessive!
sep [sep [ptext SLIT("case") <+> pprCoreExpr expr,
ifPprDebug (braces (ppr ty)),
hsep [ptext SLIT("of"),
ppr_bndr var,
char '{',
......@@ -169,7 +169,9 @@ ppr_expr add_par (Case expr var ty [(con,args,rhs)])
ppr_expr add_par (Case expr var ty alts)
= add_par $
sep [sep [ptext SLIT("case") {- <+> pprParendType ty -} <+> pprCoreExpr expr,
sep [sep [ptext SLIT("case")
<+> pprCoreExpr expr
<+> ifPprDebug (braces (ppr ty)),
ptext SLIT("of") <+> ppr_bndr var <+> char '{'],
nest 2 (sep (punctuate semi (map pprCoreAlt alts))),
char '}'
......
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