On 2/18/07, Marc Weber <[EMAIL PROTECTED]> wrote:
Why do I have to specify (Monad m) here again?
class (Monad m) => GetMV m a where
...
instance GetMV m c where
...
No instance for (Monad m)
arising from the superclasses of an instance declaration
possible fix:
add (Monad m) to the instance declaration superclass context
The class just says that any instance *requires* an instance in Monad.
Nothing more.
So when you try to instantiate something in the class you have to
ensure that it has an instance in Monad. A type variable "m" has no
instance in the class "Monad" unless you constrain it to do so in the
instance declaration (by doing "Monad m =>").
--
Sebastian Sylvan
+46(0)736-818655
UIN: 44640862
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe