| Safe Haskell | Safe-Infered |
|---|
Control.Monad.Trans.Exception
Contents
Description
This module exports the ExceptionT monad transformer.
- data ExceptionT m a
- runExceptionT :: Monad m => ExceptionT m a -> m (Either SomeException a)
The ExceptionT transformer
data ExceptionT m a Source
The ExceptionT monad transformer. This is can be used to add
MonadException functionality otherwise pure monad stacks. If your monad
stack is built on top of IO however, it already has MonadException
functionality and you should use that instead, unless you have a good
reason not to. Pass-through instances for the mtl type classes are
provided automatically by the mtl-evil-instances package.
Instances
| MonadTrans ExceptionT | |
| MonadTransControl ExceptionT | |
| MonadBaseControl b m => MonadBaseControl b (ExceptionT m) | |
| Monad m => Monad (ExceptionT m) | |
| Monad m => Functor (ExceptionT m) | |
| Monad m => MonadPlus (ExceptionT m) | |
| Monad m => Applicative (ExceptionT m) | |
| Monad m => Alternative (ExceptionT m) | |
| Monad m => MonadException (ExceptionT m) |
runExceptionT :: Monad m => ExceptionT m a -> m (Either SomeException a)Source
Run the ExceptionT monad transformer. This returns Right if
everything goes okay, and Left in the case of an error, with the
exception wrapped up in a SomeException.