ether-0.2.0.0: Monad transformers and classes

Safe HaskellNone
LanguageHaskell2010

Control.Monad.Ether.Implicit.Except

Contents

Description

Synopsis

MonadExcept class

throw :: forall e m a. MonadExcept e m => e -> m a Source

See throw.

catch :: forall e m a. MonadExcept e m => m a -> (e -> m a) -> m a Source

See catch.

The Except monad

type Except e = Except e e Source

See Except.

The ExceptT monad transformer

type ExceptT e = ExceptT e e Source

See ExceptT.

exceptT :: m (Either e a) -> ExceptT e m a Source

See exceptT.

runExceptT :: ExceptT e m a -> m (Either e a) Source

mapExceptT :: (m (Either e a) -> n (Either e b)) -> ExceptT e m a -> ExceptT e n b Source

See mapExceptT. Note that due to implicit tagging the exception type cannot be changed.

Handle functions

handle :: (e -> a) -> Except e a -> a Source

See handle.

handleT :: Functor m => (e -> a) -> ExceptT e m a -> m a Source

See handleT.