Ranges and the Enum class

Aaron Denney wnoise at ofb.net
Fri Mar 17 11:48:52 EST 2006

Sometime back on one of the other Haskell lists, there was a proposal
to not have the floating types instances of Enum and instead have some
other class to which [a, b..c] desugars.  That is, rename enumFromThen
and friends and put them in another class.  Put simply, Float and Double
should not support succ and pred (unless, perhaps, they map to the next
greater/lesser representable number, which would also be confusing).
I can even see an argument for not allowing Float or Double to be used
for ranges either, as the steps may not be exact, which in practice
turns out to be very confusing.

This is a wart I would really like to see get fixed.

Aaron Denney

More information about the Haskell-prime mailing list