Exceptions are optimized away in certain situations
The issue came up in this thread on glasgow-haskell-users.
Steps to reproduce:
-- file Foo.hs import Control.Exception import Control.DeepSeq main = evaluate (('a' : undefined) `deepseq` return () :: IO ())
$ ghc -fforce-recomp -fpedantic-bottoms -O Foo.hs
The program should fail with:
The program succeeds.
Compiling the program with
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information