| Safe Haskell | Safe | 
|---|---|
| Language | Haskell2010 | 
Nest.EitherT
- type EitherT = ExceptT
 - data ExceptT e (m :: * -> *) a :: * -> (* -> *) -> * -> *
 - newEitherT :: f (Either e a) -> EitherT e f a
 - runEitherT :: EitherT e f a -> f (Either e a)
 - eitherT :: Monad m => (x -> m b) -> (a -> m b) -> EitherT x m a -> m b
 - mapEitherT :: (m (Either x a) -> n (Either y b)) -> EitherT x m a -> EitherT y n b
 - bimapEitherT :: Functor m => (x -> y) -> (a -> b) -> EitherT x m a -> EitherT y m b
 - firstEitherT :: Functor m => (x -> y) -> EitherT x m a -> EitherT y m a
 - secondEitherT :: Functor m => (a -> b) -> EitherT x m a -> EitherT x m b
 - left :: Applicative f => e -> EitherT e f a
 
Documentation
data ExceptT e (m :: * -> *) a :: * -> (* -> *) -> * -> * #
A monad transformer that adds exceptions to other monads.
ExceptT constructs a monad parameterized over two things:
- e - The exception type.
 - m - The inner monad.
 
The return function yields a computation that produces the given
 value, while >>= sequences two subcomputations, exiting on the
 first exception.
Instances
| MonadTrans (ExceptT e) | |
| Monad m => Monad (ExceptT e m) | |
| Functor m => Functor (ExceptT e m) | |
| MonadFix m => MonadFix (ExceptT e m) | |
| MonadFail m => MonadFail (ExceptT e m) | |
| (Functor m, Monad m) => Applicative (ExceptT e m) | |
| Foldable f => Foldable (ExceptT e f) | |
| Traversable f => Traversable (ExceptT e f) | |
| (Eq e, Eq1 m) => Eq1 (ExceptT e m) | |
| (Ord e, Ord1 m) => Ord1 (ExceptT e m) | |
| (Read e, Read1 m) => Read1 (ExceptT e m) | |
| (Show e, Show1 m) => Show1 (ExceptT e m) | |
| MonadZip m => MonadZip (ExceptT e m) | |
| MonadIO m => MonadIO (ExceptT e m) | |
| (Functor m, Monad m, Monoid e) => Alternative (ExceptT e m) | |
| (Monad m, Monoid e) => MonadPlus (ExceptT e m) | |
| (Eq e, Eq1 m, Eq a) => Eq (ExceptT e m a) | |
| (Ord e, Ord1 m, Ord a) => Ord (ExceptT e m a) | |
| (Read e, Read1 m, Read a) => Read (ExceptT e m a) | |
| (Show e, Show1 m, Show a) => Show (ExceptT e m a) | |
newEitherT :: f (Either e a) -> EitherT e f a Source #
runEitherT :: EitherT e f a -> f (Either e a) Source #
left :: Applicative f => e -> EitherT e f a Source #