| Especially converting rationals to a string and back should 
| always be the identity. It would be better to print rationals in the
| form       
|        numerator % denominator
| 
| and read them in the same form.

Oh yes, that is absolutely what Haskell does for Rationals.
The 'read' and 'show' for Rational uses the % notation.  No
proposed change here.

The point is instead this: if you specifically want to read a Rational
from
a string like "3.24", which is perfectly reasonable (324 % 100),
then the same function (readFloat) should do it as read a Float from the
string in that format.  That's what type-class overloading is for.

Simon

_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to