id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
73	"Sieve of Eratosthenes crashes if using ""Integer"" while not if using ""Int"""	guest	nobody	"The following program crashes near the 5000th prime nr. 
{{{
sieveGH :: ([Integer], Integer) -> Integer
sieveGH ([], y) = 0
sieveGH ((p:xs), 0) = p
sieveGH ((p:xs), y) = sieveGH ([x| x <- xs, x `mod` p /= 0], y-1)
}}}
While the following does not crash, and i was taught that Integer was designed for near infinite/large calculations(?) :
{{{
sieveGH :: ([Int], Int) -> Int
sieveGH ([], y) = 0
sieveGH ((p:xs), 0) = p
sieveGH ((p:xs), y) = sieveGH ([x| x <- xs, x `mod` p /= 0], y-1)

Main> sieveGH ([2..], 10000)
104743
(505275796 reductions, 696417680 cells, 787 garbage collections)
}}}"	defect	new	minor		hugs	200609			
