[Haskell-cafe] Monad laws
almeidaraf at gmail.com
Sun Jun 29 03:38:44 UTC 2014
On Sun, Jun 29, 2014 at 12:11 AM, Brandon Allbery <allbery.b at gmail.com>
> On Sat, Jun 28, 2014 at 10:59 PM, Rafael Almeida <almeidaraf at gmail.com>
>> What is there to be gained by such a law which can't be enforced by the
> There are lots of things that can't be enforced by the compiler; for
> example, it can't force you to write an Ord instance that implements a
> correct total ordering. Does this make Ord less useful to you? Or pointless?
No. I'm not trying to say Monad laws are useless or pointless. Rather, I am
looking to understand the usefulness of those laws.
People are indeed going to expect that the < operator is transitive. Even
though the compiler can do nothing about it. I'm not sure how to explain
why we need < to be transitive. If you do so, please explain that to me as
well. I always took it for granted that such law must be obeyed.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe