Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class Monad m => MonadIO m where
- class Monad m => MonadFailure m where
- type Failure m
- class Monad m => MonadThrow m where
- class MonadThrow m => MonadCatch m where
- class MonadCatch m => MonadBracket m where
- class MonadTrans trans where
- newtype Identity a :: * -> * = Identity {
- runIdentity :: a
Documentation
class Monad m => MonadFailure m where Source #
Monad that can represent failure
Similar to MonadFail but with a parametrized Failure linked to the Monad
The associated type with the MonadFailure, representing what failure can be encoded in this monad
MonadFailure Maybe Source # | |
MonadFailure (Either a) Source # | |
MonadFailure m => MonadFailure (ReaderT r m) Source # | |
(Functor m, MonadFailure m) => MonadFailure (StateT s m) Source # | |
MonadFailure m => MonadFailure (Conduit i o m) Source # | |
class Monad m => MonadThrow m where Source #
Monad that can throw exception
throw :: Exception e => e -> m a Source #
Throw immediatity an exception.
Only a MonadCatch
monad will be able to catch the exception using catch
MonadThrow IO Source # | |
MonadThrow m => MonadThrow (ResourceT m) Source # | |
MonadThrow m => MonadThrow (ReaderT r m) Source # | |
(Functor m, MonadThrow m) => MonadThrow (StateT s m) Source # | |
MonadThrow m => MonadThrow (Conduit i o m) Source # | |
class MonadThrow m => MonadCatch m where Source #
Monad that can catch exception
MonadCatch IO Source # | |
MonadCatch m => MonadCatch (ResourceT m) Source # | |
MonadCatch m => MonadCatch (ReaderT r m) Source # | |
(Functor m, MonadCatch m) => MonadCatch (StateT s m) Source # | |
MonadCatch m => MonadCatch (Conduit i o m) Source # | |
class MonadCatch m => MonadBracket m where Source #
Monad that can ensure cleanup actions are performed even in the case of exceptions, both synchronous and asynchronous. This usually excludes continuation-based monads.
generalBracket :: m a -> (a -> b -> m ignored1) -> (a -> SomeException -> m ignored2) -> (a -> m b) -> m b Source #
A generalized version of the standard bracket function which allows distinguishing different exit cases.
MonadBracket IO Source # | |
MonadBracket m => MonadBracket (ResourceT m) Source # | |
class MonadTrans trans where Source #
Basic Transformer class
lift :: Monad m => m a -> trans m a Source #
Lift a computation from an inner monad to the current transformer monad
MonadTrans ResourceT Source # | |
MonadTrans (ReaderT r) Source # | |
MonadTrans (StateT s) Source # | |
MonadTrans (Conduit i o) Source # | |
newtype Identity a :: * -> * #
Identity functor and monad. (a non-strict monad)
Since: 4.8.0.0
Identity | |
|