Safe Haskell | None |
---|---|
Language | Haskell2010 |
A high-performance, strict, church-encoded carrier for Accum
.
This carrier issues left-associated mappend
s, meaning that Monoid
s such as []
with poor performance for left-associated mappend
s are ill-suited for use with this carrier. Alternatives such as Endo
, Seq
, or DList
may be preferred.
Since: 1.1.2.0
Synopsis
- runAccum :: (w -> a -> m b) -> w -> AccumC w m a -> m b
- execAccum :: Applicative m => w -> AccumC w m a -> m w
- evalAccum :: Applicative m => w -> AccumC w m a -> m a
- newtype AccumC w m a = AccumC (forall r. (w -> a -> m r) -> w -> m r)
- module Control.Effect.Accum
Accum carrier
execAccum :: Applicative m => w -> AccumC w m a -> m w Source #
evalAccum :: Applicative m => w -> AccumC w m a -> m a Source #
Since: 1.1.2.0
AccumC (forall r. (w -> a -> m r) -> w -> m r) |
Instances
Monoid w => MonadTrans (AccumC w) Source # | |
Defined in Control.Carrier.Accum.Church | |
(Monad m, Monoid w) => Monad (AccumC w m) Source # | |
Functor (AccumC w m) Source # | |
(MonadFix m, Monoid w) => MonadFix (AccumC w m) Source # | |
Defined in Control.Carrier.Accum.Church | |
(MonadFail m, Monoid w) => MonadFail (AccumC w m) Source # | |
Defined in Control.Carrier.Accum.Church | |
Monoid w => Applicative (AccumC w m) Source # | |
Defined in Control.Carrier.Accum.Church | |
(MonadIO m, Monoid w) => MonadIO (AccumC w m) Source # | |
Defined in Control.Carrier.Accum.Church | |
(Alternative m, Monad m, Monoid w) => Alternative (AccumC w m) Source # | |
(MonadPlus m, Monoid w) => MonadPlus (AccumC w m) Source # | |
(Algebra sig m, Monoid w) => Algebra (Accum w :+: sig) (AccumC w m) Source # | |
Accum effect
module Control.Effect.Accum