let { binds2 = {-# SCC "ZapInd" #-} shortOutIndirections binds1 } ;
-- Dump the result of this iteration
- endIteration dflags mode iteration_no max_iterations counts1 binds2 rules1 ;
+ end_iteration dflags mode iteration_no max_iterations counts1 binds2 rules1 ;
-- Loop
do_iteration us2 (iteration_no + 1) all_counts binds2 rules1
(us1, us2) = splitUniqSupply us
-------------------
-endIteration :: DynFlags -> SimplifierMode -> Int -> Int
+end_iteration :: DynFlags -> SimplifierMode -> Int -> Int
-> SimplCount -> [CoreBind] -> [CoreRule] -> IO ()
--- Same as endPass but with simplifier counts
-endIteration dflags mode iteration_no max_iterations counts binds rules
+-- Same as endIteration but with simplifier counts
+end_iteration dflags mode iteration_no max_iterations counts binds rules
= do { Err.dumpIfSet_dyn dflags Opt_D_dump_simpl_iterations pass_name
(pprSimplCount counts) ;
- ; endPass dflags pass_name Opt_D_dump_simpl_iterations binds rules }
+ ; endIteration dflags pass_name Opt_D_dump_simpl_iterations binds rules }
where
pass_name = "Simplifier mode " ++ showPpr mode ++
", iteration " ++ show iteration_no ++
RULES: we want to *add* any RULES for x_local to x_exported.
-Note [Messing up the exported Id's IdInfo]
+Note [Messing up the exported Id's RULES]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-We must be careful about discarding the IdInfo on the old Id
-
-The example that went bad on me at one stage was this one:
+We must be careful about discarding (obviously) or even merging the
+RULES on the exported Id. The example that went bad on me at one stage
+was this one:
iterate :: (a -> a) -> a -> [a]
[Exported]