Proposal: Add the orphan instance Monoid e => Monad ((, )e) to Data.Monoid

Paterson, Ross R.Paterson at city.ac.uk
Sun Nov 13 01:56:00 CET 2011


Bas van Dijk writes:
> BTW, it would be really nice if transformers could change its WriterT type from:

> newtype WriterT w m a = WriterT { runWriterT :: m (a, w) }

> to:

> newtype WriterT w m a = WriterT { runWriterT :: m (w, a) }

> so that it becomes compatible with the proposed ((,) w) instance.

> Ross, any chance that this could be done. Or does this break to much code?

Just every module that uses WriterT, runWriterT or runWriter.  Is the neatness worth it?


More information about the Libraries mailing list