Drastic Prelude changes imminent

Henning Thielemann schlepptop at henning-thielemann.de
Wed Feb 11 21:01:35 UTC 2015

Am 01.02.2015 um 23:02 schrieb Edward Kmett:

> On Sun, Feb 1, 2015 at 4:39 PM, Iavor Diatchki <iavor.diatchki at gmail.com
> <mailto:iavor.diatchki at gmail.com>> wrote:
>     Really?  This is not obvious at all.  Is it because of the odd
>     `Applicative` instance for pairs? I am saying 'odd' because there
>     are no similar instances for tuples of higher arity;  there are also
>     no instance for `Monad` for the same type, which makes as much
>     sense, I guess.  Obviously this is just an opinion, but I don't
>     think these instances fit pairs naturally, and make for confusing
>     looking code.
> instance Monoid m => Monad ((,) m)
> is the "unnamed" writer monad that corresponds to the

That looks like a hack which requires another hack (namely moving Monoid 
to Prelude). Would it have been too difficult to use the Writer monad 
from transformers or mtl? Btw. I think if I use this instance this is 
certainly by accident. I prefer to be explicit about my programming 
intentions and would use the Writer monad.

More information about the Libraries mailing list