PROPOSAL: Make Applicative a superclass of Monad

Ashley Yakeley ashley at
Mon Jun 30 02:45:29 EDT 2008

Iavor Diatchki wrote:

> I think that this is a good change to make, and I don't think that it
> is in any way related to the introduction of class aliases, which is a
> fairly major extension (i.e., it requires changes to the compiler),
> that we have no experience with, and whose design has not really be
> tried out in practise.

I agree with this. At worst, without class aliases, it just means 
programmers need to copy and paste some boilerplate:

   instance Functor MyMonad where
     fmap = applicative_fmap

   instance Applicative MyMonad where
     ap = monad_ap
     (>>) = monad_aseq
     return = ...

Ashley Yakeley

More information about the Haskell-prime mailing list