[Haskell-cafe] How to convert Num a => a to Int

Albert Y. C. Lai trebla at vex.net
Wed Mar 14 22:22:44 EDT 2007


Moreover:

from RealFrac to Int (or Integral): truncate, round, ceiling, or floor, 
depending on how you want to lose information.

from Num to Int: there is none with such generality, since there are too 
many conceivable variations.



More information about the Haskell-Cafe mailing list