[Haskell-cafe] Eval forgotten unless type specified?
Jeffrey Brown
jeffbrown.the at gmail.com
Sun Oct 19 06:32:46 UTC 2014
In this passage, after the seq call, :sprint reveals x and y to be
evaluated:
let x = 1 + 2 :: Int
let y = x + 1
:sprint x
:sprint y
seq y ()
:sprint x
:sprint y
The above is a verbatim quote of Marlow's Concurrency book, chapter 2.
In the below, however, :sprint shows them unevaluated both before and after
the seq call.
let x = 1 + 2
let y = x + 1
:sprint x
:sprint y
seq y ()
:sprint x
:sprint y
Why?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141018/fb37c1a0/attachment.html>
More information about the Haskell-Cafe
mailing list