[Haskell-cafe] Functor => Applicative => Monad
Max Bolingbroke
batterseapower at hotmail.com
Wed Dec 15 09:14:14 CET 2010
3, John Smith <voldermort at hotmail.com> wrote:
> I would like to formally propose that Monad become a subclass of
> Applicative
I'm not in favour of this change because of the code breakage issue.
However, I think that an acceptable plan (mentioned elsewhere on the
list, but doesn't seem to have had any subsequent discussion) would be
to introduce a GHC warning for such cases:
"Warning: you are declaring a Monad instance for MyMonad without a
corresponding Applicative instance. This will be an error in GHC 7.2"
Then in 7.2 you can remove the warning and change the class hierarchy.
(Substitute 7.4 for 7.2 if you think we need more time for library
authors to update, or if you add the warning only to the 7.2 series).
Cheers,
Max
More information about the Haskell-Cafe
mailing list