#5129: "evaluate" optimized away
---------------------------------+------------------------------------------
    Reporter:  dons              |        Owner:  simonmar                   
        Type:  bug               |       Status:  new                        
    Priority:  normal            |    Milestone:                             
   Component:  Compiler          |      Version:  7.0.3                      
    Keywords:  seq, evaluate     |     Testcase:                             
   Blockedby:                    |   Difficulty:                             
          Os:  Unknown/Multiple  |     Blocking:                             
Architecture:  Unknown/Multiple  |      Failure:  Incorrect result at runtime
---------------------------------+------------------------------------------

Comment(by simonmar):

 Right, it's quite common to use

 {{{
    do ...
       return $! e
 }}}

 to avoid the thunk that would otherwise be created for `e`.  My guess is
 that in most cases we don't care about the order of evaluation in these
 cases, so `$!` is fine.

 It also occurs to me that the simplifier won't know how to optimise
 `seqS#` unless we teach it.  For example, we want to eliminate `seqS#`
 when applied to a value.

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

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to