| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Control.Monad.Trans.Has.Accum
Documentation
newtype AccumT w (m :: Type -> Type) a #
An accumulation monad parameterized by:
w- the output to accumulate.m- The inner monad.
The return function produces the output mempty, while >>=
combines the outputs of the subcomputations using mappend.
This monad transformer is similar to both state and writer monad transformers. Thus it can be seen as
- a restricted append-only version of a state monad transformer or
- a writer monad transformer with the extra ability to read all previous output.
Constructors
| AccumT (w -> m (a, w)) |
Instances
| Monoid w => MonadTrans (AccumT w) | |
Defined in Control.Monad.Trans.Accum | |
| (Monoid w, Functor m, Monad m) => Monad (AccumT w m) | |
| Functor m => Functor (AccumT w m) | |
| (Monoid w, Functor m, MonadFix m) => MonadFix (AccumT w m) | |
Defined in Control.Monad.Trans.Accum | |
| (Monoid w, MonadFail m) => MonadFail (AccumT w m) | |
Defined in Control.Monad.Trans.Accum | |
| (Monoid w, Functor m, Monad m) => Applicative (AccumT w m) | |
Defined in Control.Monad.Trans.Accum | |
| (Monoid w, Functor m, MonadIO m) => MonadIO (AccumT w m) | |
Defined in Control.Monad.Trans.Accum | |
| (Monoid w, Functor m, MonadPlus m) => Alternative (AccumT w m) | |
| (Monoid w, Functor m, MonadPlus m) => MonadPlus (AccumT w m) | |