
15 Aug
2006
15 Aug
'06
6:19 a.m.
Hello Taral, Tuesday, August 15, 2006, 3:11:37 AM, you wrote:
Do we complain about a duplicate instance declarations?
yes. after all, this is just syntax sugar of giving both declarations:
Not necessarily. If A doesn't have any Functor declarations, it could be considered just a Monad without a Functor.
in this case we lose "class Functor a => Monad a" base class declaration. so what will be the meaning of this: class Monad m where instance Functor m return :: ... .... and this: class Monad m where instance Functor m where fmap = return ... return :: ... .... ? -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com