Safe Haskell | None |
---|---|
Language | Haskell2010 |
Empty carrier
execEmpty :: Functor m => EmptyC m a -> m Bool Source #
Run an Empty
effect, replacing its result with a Bool
indicating whether control exited normally.
This is convenient for using empty
to signal early returns when all you need to know is whether control exited normally or not, and not what value it exited with.
execEmpty
=fmap
isJust
.
runEmpty
execEmpty
(pure
a) =pure
True
execEmpty
empty
=pure
False
Since: 1.1.0.0
Since: 1.0.0.0
Instances
MonadTrans EmptyC Source # | |
Defined in Control.Carrier.Empty.Maybe | |
Monad m => Monad (EmptyC m) Source # | |
Functor m => Functor (EmptyC m) Source # | |
MonadFix m => MonadFix (EmptyC m) Source # | |
Defined in Control.Carrier.Empty.Maybe | |
MonadFail m => MonadFail (EmptyC m) Source # |
|
Defined in Control.Carrier.Empty.Maybe | |
Monad m => Applicative (EmptyC m) Source # | |
MonadIO m => MonadIO (EmptyC m) Source # | |
Defined in Control.Carrier.Empty.Maybe | |
Algebra sig m => Algebra (Empty :+: sig) (EmptyC m) Source # | |
Empty effect
module Control.Effect.Empty