On 8/15/06, Bulat Ziganshin <[EMAIL PROTECTED]> wrote:
in this case we lose "class Functor a => Monad a" base class
declaration. so what will be the meaning of this:
I don't see why that is the case.
class Functor m => Monad m where
return :: a -> m a
(>>=) :: m a -> (a -> m b) -> m b
instance Functor m where
fmap f = (>>= return . f)
What's wrong with this? All Monads are Functors. If you don't provide
a Functor, it gets defined for you. The problem is working out whether
to use the default Functor or an external Functor.
--
Taral <[EMAIL PROTECTED]>
"You can't prove anything."
-- Gödel's Incompetence Theorem
_______________________________________________
Haskell-prime mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-prime