summaryrefslogtreecommitdiff
path: root/compiler/coreSyn
diff options
context:
space:
mode:
authorRoman Leshchinskiy <rl@cse.unsw.edu.au>2007-12-13 03:46:35 +0000
committerRoman Leshchinskiy <rl@cse.unsw.edu.au>2007-12-13 03:46:35 +0000
commit62f6cc1dec4223532fbd15de64db4fb036932944 (patch)
tree1e3f91c0e3bdd557943aa0998a95146075037d79 /compiler/coreSyn
parent617e9a8936534dd2aabba2c473ea67cac3c14526 (diff)
downloadhaskell-62f6cc1dec4223532fbd15de64db4fb036932944.tar.gz
Don't dump simplifier iterations with -dverbose-core2core
SimonPJ says this is the correct behaviour. We still have -ddump-simpl-iterations.
Diffstat (limited to 'compiler/coreSyn')
-rw-r--r--compiler/coreSyn/CoreLint.lhs13
1 files changed, 10 insertions, 3 deletions
diff --git a/compiler/coreSyn/CoreLint.lhs b/compiler/coreSyn/CoreLint.lhs
index adb67ad765..bd88b5f108 100644
--- a/compiler/coreSyn/CoreLint.lhs
+++ b/compiler/coreSyn/CoreLint.lhs
@@ -17,7 +17,7 @@ A ``lint'' pass to check for Core correctness
module CoreLint (
lintCoreBindings,
lintUnfolding,
- showPass, endPass
+ showPass, endPass, endIteration
) where
#include "HsVersions.h"
@@ -62,7 +62,14 @@ and do Core Lint when necessary.
\begin{code}
endPass :: DynFlags -> String -> DynFlag -> [CoreBind] -> IO [CoreBind]
-endPass dflags pass_name dump_flag binds
+endPass = dumpAndLint dumpIfSet_core
+
+endIteration :: DynFlags -> String -> DynFlag -> [CoreBind] -> IO [CoreBind]
+endIteration = dumpAndLint dumpIfSet_dyn
+
+dumpAndLint :: (DynFlags -> DynFlag -> String -> SDoc -> IO ())
+ -> DynFlags -> String -> DynFlag -> [CoreBind] -> IO [CoreBind]
+dumpAndLint dump dflags pass_name dump_flag binds
= do
-- Report result size if required
-- This has the side effect of forcing the intermediate to be evaluated
@@ -70,7 +77,7 @@ endPass dflags pass_name dump_flag binds
(text " Result size =" <+> int (coreBindsSize binds))
-- Report verbosely, if required
- dumpIfSet_core dflags dump_flag pass_name (pprCoreBindings binds)
+ dump dflags dump_flag pass_name (pprCoreBindings binds)
-- Type check
lintCoreBindings dflags pass_name binds