[Haskell-cafe] Lazy IO and closing of file handles
David Brown
haskell2 at davidb.org
Wed Mar 14 21:05:31 EDT 2007
Greg Fitzgerald wrote:
> What we need is a library for a readonly filesystem. That is, all
> the same functions but pure. I believe you could make this readonly
> library by wrapping each readonly I/O function with
> 'unsafeInterleaveIO' or 'unsafePerformIO', but I don't really
> understand the consequences of using 'unsafe' calls, so I avoided it
> myself.
SlurpDirectory from darcs tries to do this. It is likely just
specific to darcs needs, but perhaps it would be a useful thing.
I've thought about making something like this for the purposes of
harchive, but concluded that I need too much control over when things
happen. Having a memory leak that tries to read an entire filesystem
into memory isn't going to work well :-)
Dave
More information about the Haskell-Cafe
mailing list