That is what is particularly frustrating...its a tiny program and somewhat trivial thing that I am trying to achieve.

If I use mapM as suggested by others, I quickly run into - 

openFile: resource exhausted (Too many open files)

Regards,

Kashyap


Regards,
Kashyap


On Tue, Jun 24, 2014 at 9:59 PM, Brandon Allbery <allbery.b@gmail.com> wrote:
On Tue, Jun 24, 2014 at 12:25 PM, C K Kashyap <ckkashyap@gmail.com> wrote:
I used unsafeInterleaveIO after I ran into "too many open file handles" error.

That all by itself makes me think your problem is elsewhere and unsafeInterleaveIO is just covering it up.

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net