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

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/b522d3a3f970a043397a0d6556ca555648e7a9c3

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

commit b522d3a3f970a043397a0d6556ca555648e7a9c3
Author: Ian Lynagh <[email protected]>
Date:   Wed Jun 13 18:30:07 2012 +0100

    Stop exporting, and stop using, some deprecated functions

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

 compiler/basicTypes/UniqSupply.lhs      |    9 +--------
 compiler/nativeGen/AsmCodeGen.lhs       |    4 ++--
 compiler/nativeGen/RegAlloc/Liveness.hs |    6 +++---
 3 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/compiler/basicTypes/UniqSupply.lhs 
b/compiler/basicTypes/UniqSupply.lhs
index f34172f..bb40be7 100644
--- a/compiler/basicTypes/UniqSupply.lhs
+++ b/compiler/basicTypes/UniqSupply.lhs
@@ -23,7 +23,7 @@ module UniqSupply (
         lazyThenUs, lazyMapUs,
 
         -- ** Deprecated operations on 'UniqSM'
-        getUniqueUs, getUs, returnUs, thenUs, mapUs
+        getUniqueUs, getUs,
   ) where
 
 import Unique
@@ -188,13 +188,6 @@ getUniqueUs = USM (\us -> case splitUniqSupply us of
 getUniquesUs :: UniqSM [Unique]
 getUniquesUs = USM (\us -> case splitUniqSupply us of
                            (us1,us2) -> (uniqsFromSupply us1, us2))
-
-mapUs :: (a -> UniqSM b) -> [a] -> UniqSM [b]
-mapUs _ []     = returnUs []
-mapUs f (x:xs)
-  = f x         `thenUs` \ r  ->
-    mapUs f xs  `thenUs` \ rs ->
-    returnUs (r:rs)
 \end{code}
 
 \begin{code}
diff --git a/compiler/nativeGen/AsmCodeGen.lhs 
b/compiler/nativeGen/AsmCodeGen.lhs
index 15dd2dc..93e282f 100644
--- a/compiler/nativeGen/AsmCodeGen.lhs
+++ b/compiler/nativeGen/AsmCodeGen.lhs
@@ -375,7 +375,7 @@ cmmNativeGen dflags ncgImpl us cmm count
         let (withLiveness, usLive) =
                 {-# SCC "regLiveness" #-}
                 initUs usGen
-                        $ mapUs regLiveness
+                        $ mapM regLiveness
                         $ map natCmmTopToLive native
 
         dumpIfSet_dyn dflags
@@ -434,7 +434,7 @@ cmmNativeGen dflags ncgImpl us cmm count
                         = {-# SCC "RegAlloc" #-}
                           initUs usLive
                           $ liftM unzip
-                          $ mapUs (Linear.regAlloc dflags) withLiveness
+                          $ mapM (Linear.regAlloc dflags) withLiveness
 
                 dumpIfSet_dyn dflags
                         Opt_D_dump_asm_regalloc "Registers allocated"
diff --git a/compiler/nativeGen/RegAlloc/Liveness.hs 
b/compiler/nativeGen/RegAlloc/Liveness.hs
index 88023ec..5ceee3e 100644
--- a/compiler/nativeGen/RegAlloc/Liveness.hs
+++ b/compiler/nativeGen/RegAlloc/Liveness.hs
@@ -667,11 +667,11 @@ regLiveness
         -> UniqSM (LiveCmmDecl statics instr)
 
 regLiveness (CmmData i d)
-        = returnUs $ CmmData i d
+        = return $ CmmData i d
 
 regLiveness (CmmProc info lbl [])
         | LiveInfo static mFirst _ _    <- info
-        = returnUs $ CmmProc
+        = return $ CmmProc
                         (LiveInfo static mFirst (Just mapEmpty) Map.empty)
                         lbl []
 
@@ -679,7 +679,7 @@ regLiveness (CmmProc info lbl sccs)
         | LiveInfo static mFirst _ liveSlotsOnEntry     <- info
         = let   (ann_sccs, block_live)  = computeLiveness sccs
 
-          in    returnUs $ CmmProc (LiveInfo static mFirst (Just block_live) 
liveSlotsOnEntry)
+          in    return $ CmmProc (LiveInfo static mFirst (Just block_live) 
liveSlotsOnEntry)
                            lbl ann_sccs
 
 



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

Reply via email to