[Haskell-cafe] Ranges over Rational.

André Scholz andre.scholz at uni-bremen.de
Tue Feb 14 13:23:10 CET 2012


Hello,

i stumbled upon the specification of the Enum instances of Floats,
Doubles and Rationals. I understand the idea behind this specification
for floating point numbers. But why was it also used for Rational? As
Rationals are exact, it would make sense to use the same definition of
ranges as used for Integers. The specification seems to nullify the
difference between Rational and floating point types in this respect. I
would consider this a, well, a mistake in the specification.

Kind regards,
 André Scholz




More information about the Haskell-Cafe mailing list