ghc-8.10.6: The GHC API
Safe HaskellNone
LanguageHaskell2010

IOEnv

Synopsis

Documentation

data IOEnv env a Source #

Instances

Instances details
Quasi TcM # 
Instance details

Defined in TcSplice

Monad (IOEnv m) # 
Instance details

Defined in IOEnv

Methods

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

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

return :: a -> IOEnv m a Source #

Functor (IOEnv env) # 
Instance details

Defined in IOEnv

Methods

fmap :: (a -> b) -> IOEnv env a -> IOEnv env b Source #

(<$) :: a -> IOEnv env b -> IOEnv env a Source #

MonadFail (IOEnv m) # 
Instance details

Defined in IOEnv

Methods

fail :: String -> IOEnv m a Source #

Applicative (IOEnv m) # 
Instance details

Defined in IOEnv

Methods

pure :: a -> IOEnv m a Source #

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

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

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

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

MonadIO (IOEnv env) # 
Instance details

Defined in IOEnv

Methods

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

Alternative (IOEnv env) # 
Instance details

Defined in IOEnv

Methods

empty :: IOEnv env a Source #

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

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

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

MonadPlus (IOEnv env) # 
Instance details

Defined in IOEnv

Methods

mzero :: IOEnv env a Source #

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

ExceptionMonad (IOEnv a) # 
Instance details

Defined in IOEnv

Methods

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

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

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

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

MonadUnique (IOEnv (Env gbl lcl)) # 
Instance details

Defined in TcRnMonad

ContainsModule env => HasModule (IOEnv env) # 
Instance details

Defined in IOEnv

Methods

getModule :: IOEnv env Module Source #

ContainsDynFlags env => HasDynFlags (IOEnv env) # 
Instance details

Defined in IOEnv

MonadThings (IOEnv (Env TcGblEnv TcLclEnv)) # 
Instance details

Defined in TcEnv

MonadThings (IOEnv (Env DsGblEnv DsLclEnv)) # 
Instance details

Defined in DsMonad

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 Source #

A mutable variable in the IO monad

Instances

Instances details
NFData1 IORef

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

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

Eq (IORef a)

Pointer equality.

Since: base-4.0.0.0

Instance details

Defined in GHC.IORef

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: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: IORef a -> () Source #

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.