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
newtype ErrorC e (m :: Type -> Type) a Source #
Since: 1.1.0.0
Instances
MonadTrans (ErrorC e) 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 # | |
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 | |
Algebra sig m => Algebra (Error e :+: sig) (ErrorC e m) Source # | |
Error effect
module Control.Effect.Error