Why do we need Control.Monad.Instances?

Edward Kmett ekmett at gmail.com
Fri Nov 11 17:29:14 CET 2011

This is one of those warts that should be cleaned up by either doing what was done with Num, breaking with 98/2011 or fixing it in Haskell 2012 and waiting a year.

The reason they are orphans is to avoid breaking existing code that may habe defined them itself and which was written to Haskell 98, but C.M.I has been around long enough that experienced users know to grab them there, and so the main impact of hiding them in C.M.I from a "POSIWYD" perspective is to confuse newbies.

The potential impact of just doing this right is less than the impact of changing Num, so I'd say we should just do it, and make C.M.I an empty stub.

I'll draft a proposal when I get to a computer.


Sent from my iPhone

On Nov 11, 2011, at 9:09 AM, Henning Thielemann <lemming at henning-thielemann.de> wrote:

> On Fri, 11 Nov 2011, Bas van Dijk wrote:
>> I forgot the reason why we need Control.Monad.Instances which exports
>> orphaned Functor and Monad instances for ((->) r), ((,) a) and (Either
>> e):
>> https://github.com/ghc/packages-base/blob/master/Control/Monad/Instances.hs
> Compatibility with Haskell 98's Prelude?
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries

More information about the Libraries mailing list