summaryrefslogtreecommitdiff
path: root/compiler/GHC
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC')
-rw-r--r--compiler/GHC/Stg/Pipeline.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/GHC/Stg/Pipeline.hs b/compiler/GHC/Stg/Pipeline.hs
index 3a00a369e8..43f33d7fd8 100644
--- a/compiler/GHC/Stg/Pipeline.hs
+++ b/compiler/GHC/Stg/Pipeline.hs
@@ -32,19 +32,19 @@ import GHC.Utils.Panic
import GHC.Utils.Logger
import Control.Monad
import Control.Monad.IO.Class
-import GHC.Utils.Monad.State.Strict
+import Control.Monad.Trans.Reader
-newtype StgM a = StgM { _unStgM :: StateT Char IO a }
+newtype StgM a = StgM { _unStgM :: ReaderT Char IO a }
deriving (Functor, Applicative, Monad, MonadIO)
instance MonadUnique StgM where
- getUniqueSupplyM = StgM $ do { mask <- get
+ getUniqueSupplyM = StgM $ do { mask <- ask
; liftIO $! mkSplitUniqSupply mask}
- getUniqueM = StgM $ do { mask <- get
+ getUniqueM = StgM $ do { mask <- ask
; liftIO $! uniqFromMask mask}
runStgM :: Char -> StgM a -> IO a
-runStgM mask (StgM m) = evalStateT m mask
+runStgM mask (StgM m) = runReaderT m mask
stg2stg :: Logger
-> DynFlags -- includes spec of what stg-to-stg passes to do