
29 Dec
2011
29 Dec
'11
1:28 p.m.
Quoth Antoine Latter
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