Re: Monad instance for Monoid e => (,) e
Mario Blažević <mblazevic <at> stilo.com>
2013-07-26 21:30:41 GMT
On 13-07-25 01:14 PM, Edward Kmett wrote:
> +1 to the spirit of is proposal if not the planned execution
> I continue to be strongly in favor of adding this instance as it is a
> fundamental variant of the Writer Monad, and is analogous to the
> Monad/MonadReader instances for (->) e.
> The tricky part is how to structure base so that it happens, as the
> context mentions Monoid, but Monoid which appears in the context isn't
> currently in the Prelude, yet Monad and the (,) data type are known to
> the Prelude. Orphaning it is less than ideal.
> However, that seems to be resolving itself. Given the direction of the
> AMP and Foldable/Traversable changes that we're working towards for 7.10
> and the attendant need to bring Monoid into the Prelude, that may be a
> good time to fix up this missing instance and expose it properly.
> This way we don't have to bring that module full of orphans back to life.
I'm late to the party, but +1.