slight difference in strictness between -O0 and -O

Albert Y. C. Lai trebla at
Mon Mar 12 16:36:07 EDT 2007

main = print (map (const 'x') (take 1 (undefined:undefined)))

In ghci, or with ghc -O0, this produces "x".
With ghc -O, this produces Prelude.undefined.

But hey, please don't sweat too much on it! I bet it is a rather 
pathological case.

More information about the Glasgow-haskell-users mailing list