
18 Feb
2007
18 Feb
'07
2:05 p.m.
I wrote:
The other way is if the type is not fully specified - it is a variable - then you can "pass the buck" and say that whoever uses this instance must first make sure that the value of the type variable is a type that already has a Monad instance.
In this case, you are creating an obligation on users of this instance - they are required to provide the Monad instance themselves. So it makes sense that you need to write the constraint "Monad m =>" on the instance declaration, to make sure this obligation is clear to the users of the instance. Regards, Yitz