put package:polysemy

Update the state.
Update the state.
Replace the state with the given value.
An effect which can provide input to an application. Useful for dealing with streaming input.
Get the next available message.
Get the next available message.
Apply a function to an input, cf. asks
Run an Input effect by always giving back the same value.
Run an Input effect by providing a different element of a list each time. Returns Nothing after the list is exhausted.
Runs an Input effect by evaluating a monadic action for each request.
An effect capable of sending messages. Useful for streaming output and for logging.
Output a message.
Run an Output effect by ignoring it.
Output a message.
Run an Output effect in terms of atomic operations in IO. Internally, this simply creates a new IORef, passes it to runOutputMonoidIORef, and then returns the result and the final value of the IORef. Beware: As this uses an IORef internally, all other effects will have local state semantics in regards to Output effects interpreted this way. For example, throw and catch will never revert outputs, even if runError is used after outputToIOMonoid.
Like outputToIOMonoid, but right-associates uses of <>. This asymptotically improves performance if the time complexity of <> for the Monoid depends only on the size of the first argument. You should always use this instead of outputToIOMonoid if the monoid is a list, such as String. Beware: As this uses an IORef internally, all other effects will have local state semantics in regards to Output effects interpreted this way. For example, throw and catch will never revert outputs, even if runError is used after outputToIOMonoidAssocR.
Run an Output effect by transforming it into a list of its values, lazily. Warning: This inherits the nasty space leak issue of WriterT! Don't use this if you don't have to.
Run an Output effect by transforming it into a monoid, and accumulate it lazily. Warning: This inherits the nasty space leak issue of WriterT! Don't use this if you don't have to.
Like runLazyOutputMonoid, but right-associates uses of <>. This asymptotically improves performance if the time complexity of <> for the Monoid depends only on the size of the first argument. You should always use this instead of runLazyOutputMonoid if the monoid is a list, such as String. Warning: This inherits the nasty space leak issue of WriterT! Don't use this if you don't have to.
Accumulate outputs so they are delayed until they reach at least size size. If size is 0, this interpretation will not emit anything in the resulting Output effect.
Run an Output effect by transforming it into a list of its values.
Run an Output effect by transforming it into a monoid.
Like runOutputMonoid, but right-associates uses of <>. This asymptotically improves performance if the time complexity of <> for the Monoid depends only on the size of the first argument. You should always use this instead of runOutputMonoid if the monoid is a list, such as String.