Default definition for fromRational

Edward Kmett ekmett at gmail.com
Thu Oct 15 23:24:56 UTC 2015


True. I can't think of any issues off hand.

-Edward



On Thu, Oct 15, 2015 at 6:51 PM, Joe Hermaszewski <joe at haskell.monoid.al>
wrote:

> 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
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20151015/7293d037/attachment.html>


More information about the Libraries mailing list