Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/6759e5a482d927870c90efe97b820d492785a6fd

>---------------------------------------------------------------

commit 6759e5a482d927870c90efe97b820d492785a6fd
Author: Ian Lynagh <[email protected]>
Date:   Tue Oct 16 13:27:17 2012 +0100

    Remove a copy of foldM, and use the standard function instead

>---------------------------------------------------------------

 compiler/simplStg/SimplStg.lhs |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/compiler/simplStg/SimplStg.lhs b/compiler/simplStg/SimplStg.lhs
index bf9a217..dbf6cb7 100644
--- a/compiler/simplStg/SimplStg.lhs
+++ b/compiler/simplStg/SimplStg.lhs
@@ -23,6 +23,7 @@ import ErrUtils
 import SrcLoc
 import UniqSupply       ( mkSplitUniqSupply, splitUniqSupply )
 import Outputable
+import Control.Monad
 \end{code}
 
 \begin{code}
@@ -44,7 +45,7 @@ stg2stg dflags module_name binds
                 -- Do the main business!
         ; let (us0, us1) = splitUniqSupply us'
         ; (processed_binds, _, cost_centres)
-                <- foldl_mn do_stg_pass (binds', us0, ccs) (getStgToDo dflags)
+                <- foldM do_stg_pass (binds', us0, ccs) (getStgToDo dflags)
 
         ; let un_binds = unarise us1 processed_binds
 
@@ -87,10 +88,4 @@ stg2stg dflags module_name binds
             --         UniqueSupply for the next guy to use
             --         cost-centres to be declared/registered (specialised)
             --         add to description of what's happened (reverse order)
-
--- here so it can be inlined...
-foldl_mn :: (b -> a -> IO b) -> b -> [a] -> IO b
-foldl_mn _ z []     = return z
-foldl_mn f z (x:xs) = f z x     >>= \ zz ->
-                      foldl_mn f zz xs
 \end{code}



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to