Mon, 16 Apr 2001 19:03:21 -0700, Ashley Yakeley <[EMAIL PROTECTED]> pisze:
> >> Why (toRational 0.9) == (9 % 10) is False?
Because the type of 0.9 is ambiguous and is being defaulted to Double.
You can just write 0.9: it will have type Rational if needed. No need
to convert it.
You can also add
default (Integer, Rational)
in the module to let ambiguous numeric types default to Rational.
--
__("< Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/
\__/
^^ SYGNATURA ZASTÊPCZA
QRCZAK
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell