What steps will reproduce the problem?
Run this program:
$ cat Main.hs
main = print $ 1 + 2 `seq` 4
$ yhc Main
Compiling Main ( Main.hs )
$ yhi Main
5
$
What is the expected output? What do you see instead?
I would expect to see 4 instead of 5. Others agree:
$ runhugs Main
4
$ runghc Main
4
$
Please use labels and text to provide additional information.
The Haskell 98 report, chapter 8, Standard Prelude, page 104 says:
infixr 0 $, $!, `seq`
so 1+2`seq`4 should be interpreted as (1+2)`seq`4, not 1+(2`seq`4).
Original issue reported on code.google.com by thorkiln...@gmail.com on 27 Jul 2007 at 7:08
Original issue reported on code.google.com by
thorkiln...@gmail.com
on 27 Jul 2007 at 7:08