
#7582: Created thunk gets immediately evaluated -------------------------------+-------------------------------------------- Reporter: tibbe | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.6.1 Resolution: invalid | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Difficulty: Unknown Testcase: | Blockedby: Blocking: | Related: -------------------------------+-------------------------------------------- Changes (by simonpj): * status: new => closed * resolution: => invalid Comment: Yes, consider `(lookup undefined `seq` True)`. In your original program this should yield `True`. When you add the bang on `h0` you change the semantics so that the expression yields `undefined`. Different semantics, different code. I don't see how to get better behaviour while preserving semantics. Please re-open if you can see a way. Simon -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7582#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler