
2 Oct
2003
2 Oct
'03
12:25 p.m.
On Thu, 2 Oct 2003 13:16:13 +0200 Markus.Schnell@infineon.com wrote:
The Monad class is just called Monad because it is intended to cover a monad. But it doesn't ensure the laws. That is your sole responsibility.
Yeah, I know. But it's difficult to ensure I'm satisfying the laws when I'm not entirely sure what do they ask from me...
You can define it to your liking as long as it is commutative.
Ah, that's what I was expecting. So, in both my examples, defining: instance Eq MyMonad where MM _ x == MM _ y = x == y would suffice and the first law would be satisfied. Thanks, Juanma