[Haskell-cafe] A question about "monad laws"

askyle valgarv at gmx.net
Fri Mar 14 02:05:13 EDT 2008



Wolfgang Jeltsch-2 wrote:
> 
> No, I think, it’s the Prelude’s fault to define (==) as “floating point
> equality”.
> 

My bad, I meant IEEE (==) when I said it was "our" fault. I concur that the
Prelude is at fault for using the (==) symbol for FP equality. Even if you
don't
demand from (==) to be an equivalence, you're giving a pure functional type
to an impure operation (e.g because of SNaNs)

My point was that since Haskell has a known and established mechanism for
delimiting impurity, it seems as a shame not to use it to add some rigour to
the
myth-ridden, poorly understood floating point world. We need good FP for FP
=)

-----
Ariel J. Birnbaum
-- 
View this message in context: http://www.nabble.com/A-question-about-%22monad-laws%22-tp15411587p16044986.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.



More information about the Haskell-Cafe mailing list