compare on Double

David House dmhouse at
Wed Mar 21 14:58:46 EDT 2007

On 21/03/07, Neil Mitchell <ndmitchell at> wrote:
> Following on from the tradition of ByteString, will it be acceptable
> for the compiler to turn _|_ into False, as an optimisation?

My interpretation of Ian's message was a questioning of the behaviour
of compare, not of (<) etc. compare can't return False.

> I agree very much with Sven here, nothing as simple as comparison or
> equality should make a program crash. I wouldn't mind division by zero
> raising an error - that is something that you could argue for.

Doesn't compare need to force its arguments anyway, so that (0/0)
`compare` (0/0) would be a divide-by-zero error?

-David House, dmhouse at

More information about the Libraries mailing list