[Haskell-cafe] Why is toRational a method of Real?
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.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe