[GHC] #5129: "evaluate" optimized away

GHC ghc-devs at haskell.org
Tue Mar 20 07:43:18 UTC 2018


#5129: "evaluate" optimized away
-------------------------------------+-------------------------------------
        Reporter:  dons              |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.0.3
      Resolution:                    |             Keywords:  seq, evaluate
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect result  |  Unknown/Multiple
  at runtime                         |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #13930            |  Differential Rev(s):  Phab:D615,
       Wiki Page:                    |  Phab:D4514
-------------------------------------+-------------------------------------

Comment (by osa1):

 In comment:24 I say that the `case seq# ... of` is eliminated because the
 result is not used and `seq#` is effect-free. The reason why the result is
 not used is because `assertFailure` is a pure function with type `String
 -> a`. Just wanted to post this update because I was confused about this
 for a long time (I thought `assertFailure` was an IO function).

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/5129#comment:31>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list