
10 Jan
2008
10 Jan
'08
1:10 p.m.
rendel:
jerzy.karczmarczuk@info.unicaen.fr wrote:
Although it could be argued that laziness is the cause of some very obscure bugs... <g> Niko
Example, PLEASE.
Prelude> sum [1..1000000] *** Exception: stack overflow
Prelude> Data.List.foldl' (+) 0 [1..1000000] 500000500000
See, http://hackage.haskell.org/trac/ghc/ticket/1997 Strictness for for atomic numeric types is inconsitently applied across the base library. Fixing the inconsitencies would let fix a range of similar issues. Note the strictness analyser handles this in compiled code, but doesn't run in ghci. -- Don