On Thu, Dec 29, 2011 at 00:33, Mike Meyer <mwm@mired.org> wrote:
So, is there a reasonable way to get the value of two Integral types
divided by each other and rounded? How about one integral type and one
RealFrac? I know I can get it truncated towards either 0 or negative
infinity, but that's not what I want here.

You have two options:

(1) use fromIntegral to coerce an Integral value to a RealFrac;

(2) use (div) (division on Integrals) instead of (/).

Which to use depends on what you're planning to do with the result.  In this case, I'd probably use (/) and (fromIntegral).

--
brandon s allbery                                      allbery.b@gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms