| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Control.Carrier.Error.Church
Contents
Description
A church-encoded carrier for Error.
Since: 1.1.0.0
Error carrier
runError :: (e -> m b) -> (a -> m b) -> ErrorC e m a -> m b Source #
Run an Error effect, applying the first continuation to uncaught errors and the second continuation to successful computations’ results.
runErrorj k (purea) = k a
runErrorj k (throwErrore) = j e
runErrorj k (throwErrore `catchError`pure) = k e
Since: 1.1.0.0
newtype ErrorC e (m :: Type -> Type) a Source #
Since: 1.1.0.0
Instances
| MonadTrans (ErrorC e) Source # | |
Defined in Control.Carrier.Error.Church | |
| Alternative m => Alternative (ErrorC e m) Source # | |
| Applicative (ErrorC e m) Source # | |
Defined in Control.Carrier.Error.Church | |
| Functor (ErrorC e m) Source # | |
| Monad (ErrorC e m) Source # | |
| (Alternative m, Monad m) => MonadPlus (ErrorC e m) Source # | |
| MonadFail m => MonadFail (ErrorC e m) Source # | |
Defined in Control.Carrier.Error.Church | |
| MonadFix m => MonadFix (ErrorC e m) Source # | |
Defined in Control.Carrier.Error.Church | |
| MonadIO m => MonadIO (ErrorC e m) Source # | |
Defined in Control.Carrier.Error.Church | |
| Algebra sig m => Algebra (Error e :+: sig) (ErrorC e m) Source # | |
Error effect
module Control.Effect.Error