At 21:25 -0500 97/10/27, Paul Hudak wrote:
>S.D.Mechveliani wrote:
>
>> I wonder, why Haskell does not check/report the overflow for Int?
>
>After thinking about this for awhile, I agree with Sergey that there
>should be an Int datatype that truly implements partial functions, not
>total functions modulo some large N.
...
> For those
>that don't want this feature, then I have no problem also providing an
>IntMod32 datatype, or whatever; but let's call a spade a spade.
From a generalistic point of view (not necessarily in the context of
Haskell), I am inclined to believe that the Int type should be replaced by
a type named Binary(32) or something. This binary type should know how to
do +, -, signed/unsigned multiplication/division and typical fixed sized
binary operations (Boolean, shifts). This type can then be used as a
building brick for fast code and specialized binary applications.
Hans Aberg
* Email: Hans Aberg <mailto:[EMAIL PROTECTED]>
* AMS member listing: <http://www.ams.org/cml/>