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

Lennart Augustsson lennart at augustsson.net
Wed Aug 4 20:15:19 EDT 2010

You're right.  It's bad to have toRational in Real.  It's also bad to
have Show and Eq as superclasses to Num.

On Wed, Aug 4, 2010 at 8:30 PM, Omari Norman <omari at smileystation.com> wrote:
> Why is toRational a method of Real? I thought that real numbers need not
> be rational, such as the square root of two. Wouldn't it make more sense
> to have some sort of Rational typeclass with this method? Thanks.
> --Omari
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list