Proposal: New Eq and Ord instances for Double and Float

Henning Thielemann lemming at
Mon Sep 26 14:53:17 CEST 2011

On Mon, 26 Sep 2011, Duncan Coutts wrote:

> Just in case we need any more votes on this, I agree with Bryan and
> Roman. Float and Double are specified by the IEEE and we should just
> do whatever crazy thing it is they specify.

As far as I understand the Haskell 98 report, there is no need that Float 
and Double are in IEEE format or behave like IEEE floating point numbers. 
Why not having IEEESingle and IEEEDouble as types for IEEE floating point 

The problems with the Set type are also due to the fact, that Set does not 
really need an Ord instance in the sense of an ordering with respect to 
magnitude. Set would also work with an ordering like NaN < -Inf < -0 < 0 < 
Inf. I think IEEE numbers only yield one more argument to use a type class 
other than Ord for elements of Sets.

More information about the Libraries mailing list