Behavior of fromInteger on out-of-range arguments

Alastair David Reid
26 Feb 2002 20:54:02 +0000

Dean Herington:
> I strongly prefer that that behavior _not_ be provision of any
> normal Int value.

I agree.

I think a operation to let you examine the (possibly) underlying 2s
complement representation without raising an exception should be quite
separate from the operation to convert between signed and unsigned
values possibly raising an exception even though they have the same
type.  (Note that they'd have different types if Haskell followed
Java's example and made exceptions part of the type.)

Alastair Reid