writer package:arrows

Arrow transformer that adds accumulation of output.
An arrow type that augments an existing arrow with accumulating output. The ArrowWriter class contains the relevant operations.
An arrow type that collects additional output (of some Monoid type).
Run a subcomputation in the same arrow, making its additional output accessible. Typical usage in arrow notation:
proc p -> do
...
(value, output) <- (|newWriter cmd|)
Adding a WriterArrow to an arrow type, but not necessarily as the outer arrow transformer. Typically a composite arrow type is built by applying a series of arrow transformer to a base arrow (usually either a function arrow or a Kleisli arrow. One can add a transformer to the top of this stack using the lift method of the ArrowTransformer class, or remove a state transformer from the top of the stack using the runWriter encapsulation operator. The methods of this class add and remove state transformers anywhere in the stack. In the instance
instance Arrow a => ArrowAddWriter w (ArrowWriter w a) a
they are equivalent to lift and runWriter respectively. Instances are lifted through other transformers with
instance ArrowAddWriter w a a' =>
ArrowAddWriter w (FooArrow a) (FooArrow a')
Elimination of an output writer from a computation, providing the accumulated output. Typical usage in arrow notation:
proc p -> do
...
(result, output) <- (|elimWriter cmd|)
Lift a computation from an arrow to one with added output. Typical usage in arrow notation:
proc p -> ...
(|liftWriter cmd|)
Encapsulation of a writer computation, providing the accumulated output. Typical usage in arrow notation:
proc p -> do
...
(result, output) <- (|runWriter cmd|)