fromInteger :: Integer -> Int/Word

Ross Paterson ross@soi.city.ac.uk
Wed, 9 Apr 2003 14:48:55 +0100


Under Hugs, fromInteger (and thus fromIntegral) throws an exception if
the argument is outside the representable range of values, while GHC
just truncates.  And some of the libraries rely on the GHC behaviour.
It seems it's not a matter of principle with Hugs, since operations on
Int or Word silently overflow, as do the built-in conversions between
Int and Word types.