On Wed, Mar 12, 2008 at 10:03 PM, Andrew Coppin <[EMAIL PROTECTED]> wrote: > 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...
How about using appendFile? "appendFile :: FilePath -> String -> IO () The computation appendFile file str function appends the string str, to the file file." See http://haskell.org/ghc/docs/latest/html/libraries/base/System-IO.html#v%3AappendFile /Björn
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe