Default definition for fromRational

Joe Hermaszewski joe at haskell.monoid.al
Thu Oct 15 22:51:21 UTC 2015


A suitable default definition for fromRational could be the following:

fromRational n = fromInteger (numerator n) / fromInteger (denominator n)

Changing the MINIMUM pragma to just {-# MINIMAL recip | (/) #-}

- Joe


More information about the Libraries mailing list