summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTwan van Laarhoven <twanvl@gmail.com>2008-01-17 21:52:33 +0000
committerTwan van Laarhoven <twanvl@gmail.com>2008-01-17 21:52:33 +0000
commit36fa8c4890e439fe8c2a4682df2a877fa2cc606b (patch)
treec8732bc3bca169b19296e2c5e9c844cfc2b13339
parent93ed9b8d722f093aea5fa0508ed1efb6e407a81a (diff)
downloadhaskell-36fa8c4890e439fe8c2a4682df2a877fa2cc606b.tar.gz
Replace remaining uses of ioToIOEnv by liftIO, remove ioToIOEnv
-rw-r--r--compiler/iface/BinIface.hs2
-rw-r--r--compiler/utils/IOEnv.hs4
-rw-r--r--compiler/vectorise/VectMonad.hs4
3 files changed, 3 insertions, 7 deletions
diff --git a/compiler/iface/BinIface.hs b/compiler/iface/BinIface.hs
index 4f2457c341..12bde11734 100644
--- a/compiler/iface/BinIface.hs
+++ b/compiler/iface/BinIface.hs
@@ -54,7 +54,7 @@ import Control.Monad
readBinIface :: FilePath -> TcRnIf a b ModIface
readBinIface hi_path = do
nc <- getNameCache
- (new_nc, iface) <- ioToIOEnv $ readBinIface_ hi_path nc
+ (new_nc, iface) <- liftIO $ readBinIface_ hi_path nc
setNameCache new_nc
return iface
diff --git a/compiler/utils/IOEnv.hs b/compiler/utils/IOEnv.hs
index 222b42f2a2..224147f667 100644
--- a/compiler/utils/IOEnv.hs
+++ b/compiler/utils/IOEnv.hs
@@ -28,7 +28,6 @@ module IOEnv (
tryM, tryAllM, tryMostM, fixM,
-- I/O operations
- ioToIOEnv,
IORef, newMutVar, readMutVar, writeMutVar, updMutVar
) where
#include "HsVersions.h"
@@ -133,9 +132,6 @@ unsafeInterleaveM (IOEnv m) = IOEnv (\ env -> unsafeInterleaveIO (m env))
instance MonadIO (IOEnv env) where
liftIO io = IOEnv (\ env -> io)
-ioToIOEnv :: IO a -> IOEnv env a
-ioToIOEnv io = IOEnv (\ env -> io)
-
newMutVar :: a -> IOEnv env (IORef a)
newMutVar val = liftIO (newIORef val)
diff --git a/compiler/vectorise/VectMonad.hs b/compiler/vectorise/VectMonad.hs
index a7e0a28b7e..57f87d3db7 100644
--- a/compiler/vectorise/VectMonad.hs
+++ b/compiler/vectorise/VectMonad.hs
@@ -58,7 +58,7 @@ import NameEnv
import TysPrim ( intPrimTy )
import Module
import IfaceEnv
-import IOEnv ( ioToIOEnv )
+import IOEnv ( liftIO )
import DsMonad
import PrelNames
@@ -503,7 +503,7 @@ initV hsc_env guts info p
builtin_prs <- initBuiltinPRs builtins
builtin_boxed <- initBuiltinBoxedTyCons builtins
- eps <- ioToIOEnv $ hscEPS hsc_env
+ eps <- liftIO $ hscEPS hsc_env
let famInstEnvs = (eps_fam_inst_env eps, mg_fam_inst_env guts)
instEnvs = (eps_inst_env eps, mg_inst_env guts)