Behavior of fromInteger on out-of-range arguments

David Feuer
Tue, 26 Feb 2002 15:36:18 -0500 (EST)

What about having Int be considered a restricted integer that notices
overflow, and create another type (bit bunch?) that does not notice
overflow, and require explicit conversion to go from one to the other?
This would seem to be the best of both worlds.  The "bit bunch" type
could also provide useful info about its size.  It could even be
possible to have a "machine-specific bit-bunch" of the same size as an
Int or bit bunch, but with machine-specified overflow behavior that the
programmer can discover (whether this should be at compile-time or
run-time I couldn't say).

Question:  Is there any standard way in Haskell of determining the
maximal and minimal Int values?  If not, there should.

David Feuer