[Haskell-cafe] File I/O question

Don Stewart dons at galois.com
Wed Mar 12 17:04:59 EDT 2008

> 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 ?

-- Don

More information about the Haskell-Cafe mailing list