| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Control.Carrier.Empty.Maybe
Contents
Description
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=fmapisJust.runEmpty
execEmpty(purea) =pureTrue
execEmptyempty=pureFalse
Since: 1.1.0.0
newtype EmptyC (m :: Type -> Type) a Source #
Since: 1.0.0.0
Instances
| MonadTrans EmptyC Source # | |
Defined in Control.Carrier.Empty.Maybe | |
| Monad m => Applicative (EmptyC m) Source # | |
| Functor m => Functor (EmptyC m) Source # | |
| Monad m => Monad (EmptyC m) Source # | |
| MonadFail m => MonadFail (EmptyC m) Source # |
|
Defined in Control.Carrier.Empty.Maybe | |
| MonadFix m => MonadFix (EmptyC m) Source # | |
Defined in Control.Carrier.Empty.Maybe | |
| 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