ghc 8.4.1 and trac 13930
Simon Peyton Jones
simonpj at microsoft.com
Wed May 2 19:27:26 UTC 2018
Wow. Could you open a ticket?
I just tried with 8.2.2 which is what I have on this laptop, but it printed "all is well". Does that mean it was fine in 8.2, went wrong in 8.4.1 and was fixed in 8.4.2?
Simon
| -----Original Message-----
| From: Evan Laforge <qdunkan at gmail.com>
| Sent: 02 May 2018 19:39
| To: Simon Peyton Jones <simonpj at microsoft.com>
| Cc: ghc-devs at haskell.org
| Subject: Re: ghc 8.4.1 and trac 13930
|
| Ok, here's a short module:
|
| import qualified Control.Exception as Exception
|
| main :: IO ()
| main = do
| unserialize
| putStrLn "all is well"
|
| unserialize :: IO Char
| unserialize =
| if definitelyTrue
| then do
| return 'a'
| else do
| Exception.evaluate (error "wrong place")
|
| {-# NOINLINE definitelyTrue #-}
| definitelyTrue :: Bool
| definitelyTrue = True
|
|
| When compiled with -O on 8.4.1, this should print "wrong place".
| Without -O, or with 8.4.2, or if True can be inlined, or without
| evaluate, all is well.
More information about the ghc-devs
mailing list