ghc-8.2.2: The GHC API

Safe HaskellNone
LanguageHaskell2010

IOEnv

Synopsis

Documentation

data IOEnv env a Source #

Instances

Monad (IOEnv m) Source # 

Methods

(>>=) :: IOEnv m a -> (a -> IOEnv m b) -> IOEnv m b #

(>>) :: IOEnv m a -> IOEnv m b -> IOEnv m b #

return :: a -> IOEnv m a #

fail :: String -> IOEnv m a #

Functor (IOEnv m) Source # 

Methods

fmap :: (a -> b) -> IOEnv m a -> IOEnv m b #

(<$) :: a -> IOEnv m b -> IOEnv m a #

MonadFail (IOEnv m) Source # 

Methods

fail :: String -> IOEnv m a #

Applicative (IOEnv m) Source # 

Methods

pure :: a -> IOEnv m a #

(<*>) :: IOEnv m (a -> b) -> IOEnv m a -> IOEnv m b #

liftA2 :: (a -> b -> c) -> IOEnv m a -> IOEnv m b -> IOEnv m c #

(*>) :: IOEnv m a -> IOEnv m b -> IOEnv m b #

(<*) :: IOEnv m a -> IOEnv m b -> IOEnv m a #

MonadIO (IOEnv env) Source # 

Methods

liftIO :: IO a -> IOEnv env a #

Alternative (IOEnv env) Source # 

Methods

empty :: IOEnv env a #

(<|>) :: IOEnv env a -> IOEnv env a -> IOEnv env a #

some :: IOEnv env a -> IOEnv env [a] #

many :: IOEnv env a -> IOEnv env [a] #

MonadPlus (IOEnv env) Source # 

Methods

mzero :: IOEnv env a #

mplus :: IOEnv env a -> IOEnv env a -> IOEnv env a #

ExceptionMonad (IOEnv a) Source # 

Methods

gcatch :: Exception e => IOEnv a a -> (e -> IOEnv a a) -> IOEnv a a Source #

gmask :: ((IOEnv a a -> IOEnv a a) -> IOEnv a b) -> IOEnv a b Source #

gbracket :: IOEnv a a -> (a -> IOEnv a b) -> (a -> IOEnv a c) -> IOEnv a c Source #

gfinally :: IOEnv a a -> IOEnv a b -> IOEnv a a Source #

ContainsModule env => HasModule (IOEnv env) Source # 

Methods

getModule :: IOEnv env Module Source #

ContainsDynFlags env => HasDynFlags (IOEnv env) Source # 

module MonadUtils

failM :: IOEnv env a Source #

getEnv :: IOEnv env env Source #

setEnv :: env' -> IOEnv env' a -> IOEnv env a Source #

Perform a computation with a different environment

updEnv :: (env -> env') -> IOEnv env' a -> IOEnv env a Source #

Perform a computation with an altered environment

runIOEnv :: env -> IOEnv env a -> IO a Source #

tryM :: IOEnv env r -> IOEnv env (Either IOEnvFailure r) Source #

fixM :: (a -> IOEnv env a) -> IOEnv env a Source #

data IORef a :: * -> * #

A mutable variable in the IO monad

Instances

NFData1 IORef

Since: 1.4.3.0

Methods

liftRnf :: (a -> ()) -> IORef a -> () #

Eq (IORef a)

Since: 4.1.0.0

Methods

(==) :: IORef a -> IORef a -> Bool #

(/=) :: IORef a -> IORef a -> Bool #

NFData (IORef a)

NOTE: Only strict in the reference and not the referenced value.

Since: 1.4.2.0

Methods

rnf :: IORef a -> () #

newMutVar :: a -> IOEnv env (IORef a) Source #

readMutVar :: IORef a -> IOEnv env a Source #

writeMutVar :: IORef a -> a -> IOEnv env () Source #

updMutVar :: IORef a -> (a -> a) -> IOEnv env () Source #

atomicUpdMutVar :: IORef a -> (a -> (a, b)) -> IOEnv env b Source #

Atomically update the reference. Does not force the evaluation of the new variable contents. For strict update, use atomicUpdMutVar'.

atomicUpdMutVar' :: IORef a -> (a -> (a, b)) -> IOEnv env b Source #

Strict variant of atomicUpdMutVar.