
20 Mar
2009
20 Mar
'09
11:37 p.m.
On 2009 Mar 20, at 18:01, Sean Bartell wrote:
For a type "a" to be Fractional requires there to be: (/) :: a -> a -> a You can't divide an Int by another Int and (in general) get a third Int. You would probably want something like a "Fractionable" typeclass, with (/) :: a -> a -> b which would result in a Rational, but Haskell doesn't have this.
...but there is (%) :: (Integral a) => a -> a -> Ratio a -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH