diff options
author | Simon Marlow <marlowsd@gmail.com> | 2008-11-14 13:09:58 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2008-11-14 13:09:58 +0000 |
commit | 46f8e0092cacff4b2430296772218db7cfb3d123 (patch) | |
tree | b818129d73e2fe69fa57e0919597d53fc893dde8 /utils | |
parent | 9d5c9fb05b4f05d803a437cba18581d562793f43 (diff) | |
download | haskell-46f8e0092cacff4b2430296772218db7cfb3d123.tar.gz |
close the temporary Handle before removing the file
Diffstat (limited to 'utils')
-rw-r--r-- | utils/runghc/runghc.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/runghc/runghc.hs b/utils/runghc/runghc.hs index 1ce358e7d0..5baaeff4b9 100644 --- a/utils/runghc/runghc.hs +++ b/utils/runghc/runghc.hs @@ -76,7 +76,7 @@ doIt ghc args = do tmpdir <- getTemporaryDirectory bracket (openTempFile tmpdir "runghcXXXX.hs") - (\(filename,_) -> removeFile filename) + (\(filename,h) -> do hClose h; removeFile filename) $ \(filename,h) -> do getContents >>= hPutStr h hClose h |