
19 Mar
2013
19 Mar
'13
3:01 a.m.
On 03/19/2013 07:12 AM, Edward Kmett wrote:
Konstantin,
Please allow me to elaborate on Dan's point -- or at least the point that I believe that Dan is making.
Using,
let bug = Control.DeepSeq.rnf str `seq` fileContents2Bug str
or ($!!)will create a value that *when forced* cause the rnfto occur.
As you don't look at buguntil much later this causes the same problem as before!
Yes. You (and Dan) are totally right. 'Let' just bind expression, not evaluating it. Dan's evaluate trick force rnf to run before hClose. As I said - it's tricky part especially for newbie like me :)