From: sof Date: Wed, 29 Apr 1998 09:09:30 +0000 (+0000) Subject: [project @ 1998-04-29 09:09:30 by sof] X-Git-Tag: Approx_2487_patches~769 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=51697088bca32b100ea829c58042bfa2969eb5aa;p=ghc-hetmet.git [project @ 1998-04-29 09:09:30 by sof] If -dppr-debug is on, print out from_ty on coercions --- diff --git a/ghc/compiler/coreSyn/PprCore.lhs b/ghc/compiler/coreSyn/PprCore.lhs index 431e356..865d98b 100644 --- a/ghc/compiler/coreSyn/PprCore.lhs +++ b/ghc/compiler/coreSyn/PprCore.lhs @@ -275,9 +275,20 @@ ppr_expr pe (Note (SCC cc) expr) = sep [hsep [ptext SLIT("_scc_"), pSCC pe cc], ppr_parend_expr pe expr ] +#ifdef DEBUG +ppr_expr pe (Note (Coerce to_ty from_ty) expr) + = \ sty -> + if debugStyle sty && not (ifaceStyle sty) then + sep [hsep [ptext SLIT("_coerce_"), pTy pe to_ty, pTy pe from_ty], + ppr_parend_expr pe expr] sty + else + sep [hsep [ptext SLIT("_coerce_"), pTy pe to_ty], + ppr_parend_expr pe expr] sty +#else ppr_expr pe (Note (Coerce to_ty from_ty) expr) = sep [hsep [ptext SLIT("_coerce_"), pTy pe to_ty], ppr_parend_expr pe expr] +#endif ppr_expr pe (Note InlineCall expr) = ptext SLIT("_inline_") <+> ppr_parend_expr pe expr