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

L.Guo leaveye.guo at gmail.com
Mon Aug 13 10:22:30 EDT 2007

Hi All:

I am reading http://www.haskell.org/haskellwiki/Prime_numbers

The code in sector "1 Bitwise prime sieve".

I have 3 questions about it.

1) In function go, what does the number 46340 mean ? Is it sqrt(MAX_LONG) ?
2) We have this type definition :
    pureSieve :: Int -> Int
   Why there is no error (type mismatch) of this call in func main :
    pureSieve 10000000
3) In main again, what does expression [| x |] mean ? Why this cannot be execute in GHCi ?

Thanks for any advice.


More information about the Haskell-Cafe mailing list