[Haskell-cafe] Re: Implementing Mathematica

Al Falloon afalloon at synopsys.com
Thu May 31 09:19:13 EDT 2007


Jon Harrop wrote:
> On Wednesday 30 May 2007 22:15:55 Andrew Coppin wrote:
>> Note that (as I understand it) GHC implements Haskell's Integer type
>> using the GMP. And for some reason or other, they want to remove this
>> feature...
> 
> Arbitrary precision integers are quite a performance burden and they are 
> rarely used. I would not expect a language that is trying to be efficient to 
> impose arbitrary precision integers (or floats).

In Haskell, Int gives you the standard signed, fixed size integer for 
your machine, and Integer gives arbitrary precision integers. Int8, 
Int16, ... provide signed ints of a known size, and Word8, Word16 give 
the unsigned.

They are all instances of Num, so integer literals will be whatever type 
is needed.



More information about the Haskell-Cafe mailing list