| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Control.Carrier.Accum.IORef
Contents
Description
A carrier for Accum effects.
This carrier performs its append operations strictly and thus avoids the space leaks inherent in lazy writer monads.
These appends are left-associative; as such, [] is a poor choice of monoid for computations that entail many calls to add.
The Seq or DList monoids may be a superior choice.
This carrier also uses an IORef to store its accumulator, which allows it a MonadUnliftIO instance, but precludes backtracking when run in conjunction with NonDet.
Since: 1.1.2.0
Accum carrier
newtype AccumC w (m :: Type -> Type) a Source #
Since: 1.1.2.0
Instances
| MonadTrans (AccumC w) Source # | |
Defined in Control.Carrier.Accum.IORef | |
| Alternative m => Alternative (AccumC w m) Source # | |
| Applicative m => Applicative (AccumC w m) Source # | |
Defined in Control.Carrier.Accum.IORef | |
| Functor m => Functor (AccumC w m) Source # | |
| Monad m => Monad (AccumC w m) Source # | |
| (Alternative m, Monad m) => MonadPlus (AccumC w m) Source # | |
| MonadFail m => MonadFail (AccumC w m) Source # | |
Defined in Control.Carrier.Accum.IORef | |
| MonadFix m => MonadFix (AccumC w m) Source # | |
Defined in Control.Carrier.Accum.IORef | |
| MonadIO m => MonadIO (AccumC w m) Source # | |
Defined in Control.Carrier.Accum.IORef | |
| MonadUnliftIO m => MonadUnliftIO (AccumC w m) Source # | |
Defined in Control.Carrier.Accum.IORef | |
| (Algebra sig m, Semigroup w, MonadIO m) => Algebra (Accum w :+: sig) (AccumC w m) Source # | |
Accum effect
module Control.Effect.Accum