GHC lazy eval optimization bug

Stefan O'Rear stefanor at
Sun Feb 3 15:18:01 EST 2008

On Sun, Feb 03, 2008 at 02:37:42PM -0500, Adam P Jenkins wrote:
> The haskell program below demonstrates an optimization bug with the
> GHC compiler.  I have tried this with ghc 6.8.1 on my MacBook Pro and
> on a Linux i686 machine.  This email should build as a literate haskell
> program.  Build the program as

While this may be unfortunate, it is a consequence of document
behavior; thus I would not consider it a bug per-se.  Try with
-fno-state-hack; the documentation for this option, I believe, should
explain what is going on.  (Hint: IO a ~ State# -> (State#, a))

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url :

More information about the Glasgow-haskell-users mailing list