Commit b522d3a3 authored by Ian Lynagh's avatar Ian Lynagh

Stop exporting, and stop using, some deprecated functions

parent d6cef3c9
......@@ -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}
......
......@@ -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"
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment