
12 Nov
2012
12 Nov
'12
11:56 a.m.
Did you try -fpedantic-bottoms?
I just tried. The exception (or seq?) is still optimized away. Here is what I tried: -- file Foo.hs import Control.Exception import Control.DeepSeq main = evaluate (('a' : undefined) `deepseq` return () :: IO ()) $ ghc -fforce-recomp -fpedantic-bottoms -O Foo.hs && ./Foo && echo bar [1 of 1] Compiling Main ( Foo.hs, Foo.o ) Linking Foo ... bar Cheers, Simon