From: Matthijs Kooijman Date: Thu, 18 Jun 2009 12:47:15 +0000 (+0200) Subject: Print the type in the transform debug output. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=e184a93a2d3c19afdade23ec707a000652a5dcbc;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Print the type in the transform debug output. --- 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''