Quoth Antoine Latter <aslat...@gmail.com>,
...
> Would this program then loop:
>
> append fromFilePath toFilePath = do
>   str <- readFile fromFile
>   writeFile toFile str
>
> if 'from' and 'to' where the same file?
>
> Currently the locking prevents this.

Do you mean, locking makes that work, or just makes it fail in a
different way?  Anyway, I think that's an example that would have
the same issues without hGetContents - that is, any way you set
out to overwrite a file by modifying its contents, you have the
same problem.

        Donn

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to