writer package:polysemy

An effect capable of emitting and intercepting messages.
Transform a Writer o effect into a Writer (Endo o) effect, right-associating all uses of <> for o. This can be used together with raiseUnder in order to create -AssocR variants out of regular Writer interpreters.
Like writerToIOFinal. 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 writerToIOFinal if the monoid is a list, such as String. Beware: Effects that aren't interpreted in terms of IO will have local state semantics in regards to Writer effects interpreted this way. See Final.
Run a Writer effect by transforming it into atomic operations through final IO. Internally, this simply creates a new TVar, passes it to runWriterTVar, and then returns the result and the final value of the TVar. Beware: Effects that aren't interpreted in terms of IO will have local state semantics in regards to Writer effects interpreted this way. See Final.
A variant of runWriterTVar where an STM action is used instead of a TVar to commit tells.
Transform an Output effect into a Writer effect.
Run a Writer effect in the style of WriterT lazily. Warning: This inherits the nasty space leak issue of WriterT! Don't use this if you don't have to.
Like runLazyWriter, 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 runLazyWriter 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.
Run a Writer effect in the style of WriterT (but without the nasty space leak!)
Like runWriter, 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 runWriter if the monoid is a list, such as String.
Transform a Writer effect into atomic operations over a TVar through final IO.