[Haskell-cafe] instance Enum Double considered not entirely great?
Chris Smith
cdsmith at gmail.com
Sun Sep 25 23:13:47 CEST 2011
> Don't mix range and arithmetic sequences. I want arithmetic sequences for
> Double, Float and Rational, but not range.
> (For Float and Double one could implement range [all values between the
> given bounds, in increasing order, would be the desired/expected semantics
> for that, I think?],
Okay, fine, I tried. Obviously, I'm opposed to just flat removing
features from the language, especially when they are so useful that they
are being used without any difficulty at all by the 12 year olds I'm
teaching right now.
Someone (sorry, not me) should really write up the proposed change to
Ord for Float/Double and shepherd them through the haskell-prime
process. That one shouldn't even be controversial; there's already an
isNaN people should be using for NaN checks, and any code relying on the
current behavior is for all intents and purposes broken anyway. The
only question is whether to add the new methods to RealFloat (breaking
on the bizarre off chance that someone has written a nonstandard
RealFloat instance), or add a new IEEE type class.
--
Chris Smith
More information about the Haskell-Cafe
mailing list