[Haskell-cafe] Monad laws

Brandon Allbery allbery.b at gmail.com
Sun Jun 29 03:52:01 UTC 2014

On Sat, Jun 28, 2014 at 11:38 PM, Rafael Almeida <almeidaraf at gmail.com>

> No. I'm not trying to say Monad laws are useless or pointless. Rather, I
> am looking to understand the usefulness of those laws.

My point was more that Ord could *also* be different; it could support
partial ordering, for example, or could support non-mathematical ordering
which would e.g. enable Data.Map to be used with things that don't have
mathematical total ordering, like Complex Double, or possibly to fix its
behavior with Double whose Ord instance is actually not a proper total
ordering; what matters is not that there is a mathematical total ordering,
but that there is *some* kind of reliable ordering that can be used to
build a tree.

I imagine that, like Ord, a decision was made to implement the proper
mathematical abstraction and not merely a convenient one. This seems to be
the "Haskell way". (I'm not sure how it explains Double, though the numeric
hierarchy has a lot of compromises in the name of convenience or expected
behavior. Possibly Monad was in some sense a reaction to this, even: "we
got that one wrong, let's do this one correctly".)

brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140628/6dd01d0f/attachment.html>

More information about the Haskell-Cafe mailing list