projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3972d4f
)
Show types of case result when debug is on
author
simonpj@microsoft.com
<unknown>
Wed, 8 Feb 2006 15:03:57 +0000
(15:03 +0000)
committer
simonpj@microsoft.com
<unknown>
Wed, 8 Feb 2006 15:03:57 +0000
(15:03 +0000)
ghc/compiler/coreSyn/PprCore.lhs
patch
|
blob
|
history
diff --git
a/ghc/compiler/coreSyn/PprCore.lhs
b/ghc/compiler/coreSyn/PprCore.lhs
index
e20d5ee
..
864f4bd
100644
(file)
--- a/
ghc/compiler/coreSyn/PprCore.lhs
+++ b/
ghc/compiler/coreSyn/PprCore.lhs
@@
-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 $
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 '{',
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 $
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 '}'
ptext SLIT("of") <+> ppr_bndr var <+> char '{'],
nest 2 (sep (punctuate semi (map pprCoreAlt alts))),
char '}'