[Haskell-cafe] A few questions on primes generating.

Isaac Dupree isaacdupree at charter.net
Mon Aug 13 11:35:33 EDT 2007

L.Guo wrote:
> Because 10,000,000 is too large for a Int

On my pitiful system,
> maxBound::Int
is certainly greater than

> it is always in type of Integer or some higher level data type.

Haskell doesn't do static checking like that. In GHC on my system (where
10,000,000,000 is too large for an Int - note ten zeroes),
> 10000000000::Int
(Hugs gives "Program error: arithmetic overflow")


More information about the Haskell-Cafe mailing list