Re: [Haskell-beginners] lazy IO by example

5 Feb
2011
5 Feb
'11
5:01 a.m.
2011/2/5 Dean Herington
In your simplified example, it suffices to wrap unsafeInterleaveIO around (mapM content ds). In a more realistic case, you'd need to add some `unsafeInterleaveIO`s in `files` and `directories`, too.
Thanks a lot! Now it was easy to write a lazy findFiles. Would one have to write down a lot in order to see "on paper" why the original example was not lazy? If I coud do this, I might run into fewer problems in the future.
Dean
P.S. You might also want to look into iteratees, which accomplish a similar goal in a more robust way.
Yes, I already looked over the article in Monad reader #16. But then I thaught I will first gain more understanding of the traditional way and then return to iteratees. Regards Tim
5217
Age (days ago)
5217
Last active (days ago)
0 comments
1 participants
participants (1)
-
Tim Baumgartner