type Except e = ExceptT e Identity { } #
newtype ExceptT e m a { } #
ExceptT { runExceptT :: m (Either e a) }
The exception monad transformer.
class Monad m => MonadError e m { } #

Methods

throwError :: e -> m a
catchError :: (m a) -> (e -> m a) -> m a
Class for monads with exceptions.
runExcept :: (Except e a) -> Either e a { } #
Run an Except.
mapExcept :: ((Either e a) -> Either e' b) -> (Except e a) -> Except e' b { } #
Map the result.
withExcept :: (e -> e') -> (Except e a) -> Except e' a { } #
Transform the exception.
<*> :: { } #
>>= :: { } #
mapExceptT :: ((m (Either e a)) -> n (Either e' b)) -> (ExceptT e m a) -> ExceptT e' n b { } #
Map the inner computation.
withExceptT :: (Functor m) => (e -> e') -> (ExceptT e m a) -> ExceptT e' m a { } #
Transform the exception.
throwE :: (Monad m) => e -> ExceptT e m a { } #
O(1). Signal an error, aborting the computation.
catchE :: (Monad m) => (ExceptT e m a) -> (e -> ExceptT e' m a) -> ExceptT e' m a { } #
O(1). Handle an error by running a recovery computation.
instance Functor m => Functor (ExceptT e m) { }
instance MonadTrans (ExceptT e) { }
instance MonadIO m => MonadIO (ExceptT e m) { }
instance Monad m => MonadError e (ExceptT e m) { }