suggestions for improving MonadWriter

Roman Cheplyaka roma at ro-che.info
Sun Jan 27 22:37:56 CET 2013


* Petr P <petr.mvd at gmail.com> [2013-01-27 21:30:31+0100]
> (1) Remove the "Monoid w" constraint from the definition.

Agree.

> (2) Add
> 
>   -- | @contained m@ executes the action @m@ in a contained environment and
>   -- returns its value and its output. The current output is not modified.
>   contained :: m a -> m (a, w)
> 
> to MonadWriter.

No opinion on this one.

Roman



More information about the Libraries mailing list