[GHC] #5129: "evaluate" optimized away
GHC
cvs-ghc at haskell.org
Wed May 4 14:07:24 CEST 2011
#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
More information about the Glasgow-haskell-bugs
mailing list