slight difference in strictness between -O0 and -O

Kirsten Chevalier catamorphism at gmail.com
Mon Mar 12 17:08:00 EDT 2007


On 3/12/07, Albert Y. C. Lai <trebla at vex.net> wrote:
> 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.
>

What version of ghc?

Cheers,
Kirsten

-- 
Kirsten Chevalier* chevalier at alum.wellesley.edu *Often in error, never in doubt
"make them believe, if not in magic, in money well spent" -- Annie Gallup


More information about the Glasgow-haskell-users mailing list