[Haskell-cafe] Re: [Haskell] Re: state of HaXml?

2007-01-10 Thread Taral
On 1/10/07, Malcolm Wallace [EMAIL PROTECTED] wrote: Actually, I'm pretty sure that most Haskell RTS implementations have a finalizer attached to all file handles. Once the file handle is no longer reachable from the program graph (even if its data has not been fully consumed), the GC will

Re: [Haskell-cafe] Re: [Haskell] Re: state of HaXml?

2007-01-10 Thread Bryan O'Sullivan
Taral wrote: For a read-only operation, this shouldn't matter, however on some platforms an open file handle can prevent deletion of the file. You'd be referring to Windows, then, where you can't rename or remove a file if someone has opened it. A partial defence against this is to pass

[Haskell-cafe] RE: [Haskell] Re: state of HaXml?

2007-01-05 Thread Simon Marlow
[ moving to haskell-café... ] Norman Ramsey wrote: There seems to be a misunderstanding here: readFile in itself is not the solution. readFile is defined thus: readFile name= openFile name ReadMode = hGetContents and the original code was this: load fn = do

[Haskell-cafe] Re: [Haskell] Re: state of HaXml?

2007-01-04 Thread Donald Bruce Stewart
nr: Sure, you can replace the openFile/hGetContents pair by readFile, but the real problem is the presence of the hClose. Removing that will solve your problem (but note that you now have no control over when the file is actually closed). Can I just leave it hanging and rely on the