Safe Haskell | None |
---|---|
Language | Haskell2010 |
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.
runError
j k (pure
a) = k a
runError
j k (throwError
e) = j e
runError
j k (throwError
e `'catchError'\`pure
) = k e
Since: 1.1.0.0
Since: 1.1.0.0
Instances
MonadTrans (ErrorC e) Source # | |
Defined in Control.Carrier.Error.Church | |
Monad (ErrorC e m) Source # | |
Functor (ErrorC e m) Source # | |
MonadFix m => MonadFix (ErrorC e m) Source # | |
Defined in Control.Carrier.Error.Church | |
MonadFail m => MonadFail (ErrorC e m) Source # | |
Defined in Control.Carrier.Error.Church | |
Applicative (ErrorC e m) Source # | |
Defined in Control.Carrier.Error.Church | |
MonadIO m => MonadIO (ErrorC e m) Source # | |
Defined in Control.Carrier.Error.Church | |
Alternative m => Alternative (ErrorC e m) Source # | |
(Alternative m, Monad m) => MonadPlus (ErrorC e m) Source # | |
Algebra sig m => Algebra (Error e :+: sig) (ErrorC e m) Source # | |
Error effect
module Control.Effect.Error