How to describe this bug?

Bardur Arantsson spam at
Fri Jul 13 03:12:05 CEST 2012

On 07/10/2012 12:51 PM, malcolm.wallace wrote:
> Also, it is more likely to be a buggy instance of Eq, than a real loss
> of referential transparency.

Speaking of which... would it be remiss of me to mention the elephant in
the room, namely the Eq instance for Float?

AFAICT there is no possible way for a Float value to fulfill the Eq type
class requirements, so why is it an instance? (I'm thinking of the
"weird" Nan/Infinity behvaior primarily). Is there *really* such a huge
amount of code out there that relies on an Eq (or Ord for that matter!)
instance for Float? If so... shouldn't that code be fixed rather than
being subtly buggy?


More information about the Glasgow-haskell-users mailing list