
9 Jul
2010
9 Jul
'10
7:47 a.m.
Hello Evan, Friday, July 9, 2010, 3:01:28 AM, you wrote:
There may very well be a better way to do this, but it definitely feels better to me than relying on unsafeInterleaveIO magic. Your chan reader has to be in IO, but that's as it should be and you can still pass the chunks off to pure functions.
unsafeInterleaveIO isn't magic, it's just a way to convert IO calls to pure lazy list. one should look into getContents implementation in this case longRunningReadOperation should read from the channel when it needs more data -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com