From e184a93a2d3c19afdade23ec707a000652a5dcbc Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Thu, 18 Jun 2009 14:47:15 +0200 Subject: [PATCH] Print the type in the transform debug output. --- NormalizeTools.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NormalizeTools.hs b/NormalizeTools.hs index 90daf48..91e5b45 100644 --- a/NormalizeTools.hs +++ b/NormalizeTools.hs @@ -22,6 +22,7 @@ import qualified Var import qualified SrcLoc import qualified Type import qualified IdInfo +import qualified CoreUtils import Outputable ( showSDoc, ppr, nest ) -- Local imports @@ -53,7 +54,7 @@ applyboth first (name, second) expr = do (expr'', changed) <- Writer.listen $ second expr' if Monoid.getAny changed then - trace ("Transform " ++ name ++ " changed from:\n" ++ showSDoc (nest 4 $ ppr expr') ++ "\nTo:\n" ++ showSDoc (nest 4 $ ppr expr'') ++ "\n") $ + trace ("Transform " ++ name ++ " changed from:\n" ++ showSDoc (nest 4 $ ppr expr') ++ "\nType: \n" ++ (showSDoc $ nest 4 $ ppr $ CoreUtils.exprType expr') ++ "\n" ++ "\nTo:\n" ++ showSDoc (nest 4 $ ppr expr'') ++ "\n" ++ "Type: \n" ++ (showSDoc $ nest 4 $ ppr $ CoreUtils.exprType expr'') ++ "\n" ) $ applyboth first (name, second) expr'' else return expr'' -- 2.30.2