[Haskell-cafe] File I/O question

Andrew Coppin andrewcoppin at btinternet.com
Wed Mar 12 17:07:11 EDT 2008

Don Stewart wrote:
> andrewcoppin:
>> Don Stewart wrote:
>>> Hey Andrew,
>>> What are you trying to do? Read and write to the same file (if so, you
>>> need to use strict IO), or are you trying something sneakier?
>> I have a long-running Haskell program that writes status information to 
>> a log file. I'd like to be able to open and read that log file before 
>> the program has actually terminated. I have a similar program written in 
>> Tcl that allows me to do this, since apparently the Tcl interpretter 
>> doesn't lock output files for exclusive access. Haskell, however, does. 
>> (This seems to be the stipulated behaviour as per the Report.) If 
>> there's an easy way to change this, it would be useful...
> Did you open the file in ReadWriteMode ?

Nope. Just WriteMode. I'm trying to read the file from Notepad.exe while 
my Haskell program is still running - which takes about an hour.

More information about the Haskell-Cafe mailing list