This patch is more complicated than necessary:
Only the last call to removeFile [ removeFile progName ] needs special attention--the previous two calls [ remove cProgName ] and [ remove oProgName ] can remain as-is.
Your use of bracket does not eliminate the problem. On my system the removeFile call still fails with the same "permission denied" error. This patch works around the problem by printing an error message and then continuing (whereas previously, the build failed).
A simpler-but-equivalent "fix" would be to replace the first two applications of finallyRemove with the original calls (using removeFile), replace the third application of finallyRemove with noisyRemove, remove finallyRemove.
However, I can't help but think that there is something wrong with the System.Process that is causing this problem in the first place. But, I can't find anything obviously wrong with it.
By the way, why are there two copies of hsc2hs in the darcs repository (/ghc/utils/hsc2hs and /hsc2hs)?
Regards,
Brian
On 9/9/06, Sigbjorn Finne <[EMAIL PROTECTED]> wrote:
Sat Sep 9 07:44:32 PDT 2006 [EMAIL PROTECTED]
* remove generated files in a 'finally' manner
M ./utils/hsc2hs/Main.hs -4 +17
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc
_______________________________________________ Cvs-ghc mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/cvs-ghc
