Functor => Applicative => Monad

Krasimir Angelov kr.angelov at
Tue Dec 14 10:02:42 CET 2010

2010/12/14 John Smith <voldermort at>:
> This would break a lot of code, but this seems to happen anyway; most of
> hackage is broken on recent GHC.

At least this should be clearly stated on your proposal page. Now it
isn't even mentioned but it should be written with LARGE BOLD LETTERS.
None of the breakages caused by GHC was so deep. This should be made
first into language extension proposal because it really affects the
language and not just the libraries.

> How many Monads are not instances of Applicative? These are the Monads which
> would require extra work, whereas the Applicative Monads would require less.
> (Most Monads are currently defined twice; once as Monads, then boilerplate
> instances for Applicative Functors.)

Of course it is possible to change the affected code and to add the
necessary instances. The point is that if I am going to use only the
functionality of Monad and I don't care of Functor and Applicative
then I don't define them at all. I add them only later if I need them.

More information about the Libraries mailing list