Proposal: Applicative => Monad: Call for consensus

Antoine Latter aslatter at
Mon Jan 3 04:25:36 CET 2011

On Sun, Jan 2, 2011 at 9:04 PM, Isaac Dupree
<ml at> wrote:
> On 01/02/11 12:50, John Smith wrote:
>> On 02/01/2011 19:14, David Menendez wrote:
>>> On Sun, Jan 2, 2011 at 7:04 AM, John Smith<voldermort at> wrote:
>>>> The patches attached to
>>>> make
>>>> Applicative a superclass of Monad. Default definitions are provided for
>>>> backwards compatibility.
>>> Monad is defined in the Haskell 98 and Haskell 2010 reports. How are
>>> you planning to maintain compatibility with them?
>> The Haskell' process expects proposals to have already been implemented,
>> so I'll propose it there after acceptance by GHC. If the patches are
>> accepted for HEAD, this may be adequate for proposing towards the next
>> Haskell report, so GHC and the report will only be out of sync for a
>> minimal time.
> Even GHC 7.100 is intended to maintain compatibility with Haskell 98. We
> desire a way to implement the change that allows Haskell 98 and Haskell 2010
> programs to compile unchanged, *even if* Haskell 2011 Report includes
> libraries with a Monad hierarchy change.
> The naive way to do this is to make a different Monad class, without any
> superclasses, and put it in the haskell98 package.  This has the general
> issue that instances of the two "class Monad"s aren't compatible.  I think
> it also has a particular difficulty related to "do"-notation.

GHC supports the notion of a 'language' command line switch. I don't
know how hard it would be to co-opt it to control 'do' desugaring.

Also, there would need to be a value for language other than
'haskell98' and 'haskell2010' to turn on the new behavior.

This is all brainstorming, and may not be appropriate for a consensus
discussion, and may not be feasible for other reasons.

I also don't know if other implementations (or even GHC) would be
willing to take on this sort of complexity burden.


> _______________________________________________
> Libraries mailing list
> Libraries at

More information about the Libraries mailing list