
21 Mar
2005
21 Mar
'05
4:20 a.m.
On 21 March 2005 01:46, Iavor Diatchki wrote:
On Mon, 21 Mar 2005 00:29:38 +0100, Thomas Jäger
It is already annyoing enough that `Funtor' isn't a subclass of `Monad' although every monad must also be functor.
I think you are right. Does anyone remember why "Functor" is not a superclass of "Monad"?
I think it is because it doesn't need to be. The current situation is slightly more flexible: you don't *have* to provide a Functor instance for every Monad instance. On the other hand, it means you occasionally have to write an additional Functor context in types. You can always get around that by defining class (Functor m, Monad m) => Monad' m where {} Cheers, Simon