[Haskell-cafe] Why is toRational a method of Real?
Henning Thielemann
lemming at henning-thielemann.de
Thu Aug 5 05:24:29 EDT 2010
On Thu, 5 Aug 2010, Ivan Lazar Miljenovic wrote:
> On 5 August 2010 10:15, Lennart Augustsson <lennart at augustsson.net> wrote:
>> You're right. It's bad to have toRational in Real. It's also bad to
>> have Show and Eq as superclasses to Num.
>
> I understand why it's bad to have Show as a superclass, but why Eq?
> Because it stops you from using functions as numbers, etc. ?
Yes, and on lazy computable reals (==) is not defined for numbers that are
equal.
More information about the Haskell-Cafe
mailing list