
22 Dec
2007
22 Dec
'07
4:19 a.m.
On 12/22/07, David Benbennick
On 12/21/07, Stefan O'Rear
wrote: Because they simply aren't the same.
Good point; thanks. That means that Don's patch could theoretically break some existing Haskell program:
In fact, it's possible to get strictness to avoid stack overflow, and still have laziness to allow undefined: myEnumFrom :: Integer -> [Integer] myEnumFrom a = map (a+) $ enumDeltaIntegerStrict 0 1 where enumDeltaIntegerStrict x d = x `seq` x : enumDeltaIntegerStrict (x+d) d then *Main> (myEnumFrom 42) !! (10^6) 1000042 *Main> length $ take 10 $ myEnumFrom undefined 10