From 51697088bca32b100ea829c58042bfa2969eb5aa Mon Sep 17 00:00:00 2001 From: sof Date: Wed, 29 Apr 1998 09:09:30 +0000 Subject: [PATCH] [project @ 1998-04-29 09:09:30 by sof] If -dppr-debug is on, print out from_ty on coercions --- ghc/compiler/coreSyn/PprCore.lhs | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- 1.7.10.4