[Haskell-cafe] Monad laws

ok at cs.otago.ac.nz ok at cs.otago.ac.nz
Sun Jun 29 09:28:25 UTC 2014


On the subject of Double and laws, I imagine it would have been
possible to do the kind of thing the SML Basis Library does for
equality.  SML spells equality '=' and it's not defined on the
floating point types, which have a *different* operator, '=='.

In the same way, the Prelude could have been structured so that
integers and ratios belonged to Ord but floats did not.  Floats
could have had operators like #< #= instead.  It would have been
surprising, but so is x == x being False surprising.




More information about the Haskell-Cafe mailing list