[Haskell-cafe] Why is toRational a method of Real?

Lennart Augustsson lennart at augustsson.net
Thu Aug 5 06:21:38 EDT 2010

Yes, for instance to be able to use functions as number.
Or to be able to use constructive real numbers as numbers, since
equality is not computable.

  -- Lennart

On Thu, Aug 5, 2010 at 4:17 AM, Ivan Lazar Miljenovic
<ivan.miljenovic at gmail.com> 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. ?
> --
> Ivan Lazar Miljenovic
> Ivan.Miljenovic at gmail.com
> IvanMiljenovic.wordpress.com

More information about the Haskell-Cafe mailing list