[Haskell-cafe] different behaviours with or without putStrLn
allbery.b at gmail.com
Sun Jan 12 22:10:20 UTC 2014
On Sun, Jan 12, 2014 at 5:07 PM, Corentin Dupont
<corentin.dupont at gmail.com>wrote:
> Basically, with the following code, I want the evaluation to really happen
> on the "evaluate".
> I found out that it doesn't: it is evaluated elsewhere (I don't know
> If I put a putStrLn (commented below), the evaluation really happens there.
`evaluate` only evaluates to the first constructor, I believe. `putStrLn`
must necessarily do full evaluation. Perhaps `deepseq` would help?
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe