Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data IOEnv env a
- module MonadUtils
- failM :: IOEnv env a
- failWithM :: String -> IOEnv env a
- data IOEnvFailure = IOEnvFailure
- getEnv :: IOEnv env env
- setEnv :: env' -> IOEnv env' a -> IOEnv env a
- updEnv :: (env -> env') -> IOEnv env' a -> IOEnv env a
- runIOEnv :: env -> IOEnv env a -> IO a
- unsafeInterleaveM :: IOEnv env a -> IOEnv env a
- uninterruptibleMaskM_ :: IOEnv env a -> IOEnv env a
- tryM :: IOEnv env r -> IOEnv env (Either IOEnvFailure r)
- tryAllM :: IOEnv env r -> IOEnv env (Either SomeException r)
- tryMostM :: IOEnv env r -> IOEnv env (Either SomeException r)
- fixM :: (a -> IOEnv env a) -> IOEnv env a
- data IORef a
- newMutVar :: a -> IOEnv env (IORef a)
- readMutVar :: IORef a -> IOEnv env a
- writeMutVar :: IORef a -> a -> IOEnv env ()
- updMutVar :: IORef a -> (a -> a) -> IOEnv env ()
- atomicUpdMutVar :: IORef a -> (a -> (a, b)) -> IOEnv env b
- atomicUpdMutVar' :: IORef a -> (a -> (a, b)) -> IOEnv env b
Documentation
Instances
module MonadUtils
data IOEnvFailure Source #
Instances
Show IOEnvFailure Source # | |
Defined in IOEnv showsPrec :: Int -> IOEnvFailure -> ShowS # show :: IOEnvFailure -> String # showList :: [IOEnvFailure] -> ShowS # | |
Exception IOEnvFailure Source # | |
Defined in IOEnv |
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
unsafeInterleaveM :: IOEnv env a -> IOEnv env a Source #
uninterruptibleMaskM_ :: IOEnv env a -> IOEnv env a Source #
A mutable variable in the IO
monad
Instances
NFData1 IORef | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
Eq (IORef a) | ^ Pointer equality. Since: base-4.1.0.0 |
NFData (IORef a) | NOTE: Only strict in the reference and not the referenced value. Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq |
readMutVar :: IORef a -> IOEnv env a Source #
writeMutVar :: IORef 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
.