[commit: packages/Cabal] ghc-head: Use 'removeExistingFile' in 'allPackageSourceFiles'. (19c0fe0)

git at git.haskell.org git at git.haskell.org
Mon Aug 26 23:26:06 CEST 2013


Repository : ssh://git@git.haskell.org/Cabal

On branch  : ghc-head
Link       : http://git.haskell.org/?p=packages/Cabal.git;a=commit;h=19c0fe04de0fea19794c2630defb716c186b827d

>---------------------------------------------------------------

commit 19c0fe04de0fea19794c2630defb716c186b827d
Author: Mikhail Glushenkov <mikhail.glushenkov at gmail.com>
Date:   Wed May 29 01:16:06 2013 +0200

    Use 'removeExistingFile' in 'allPackageSourceFiles'.


>---------------------------------------------------------------

19c0fe04de0fea19794c2630defb716c186b827d
 cabal-install/Distribution/Client/Sandbox/Timestamp.hs |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cabal-install/Distribution/Client/Sandbox/Timestamp.hs b/cabal-install/Distribution/Client/Sandbox/Timestamp.hs
index 28fee8e..b75337d 100644
--- a/cabal-install/Distribution/Client/Sandbox/Timestamp.hs
+++ b/cabal-install/Distribution/Client/Sandbox/Timestamp.hs
@@ -21,7 +21,7 @@ import Control.Exception                             (finally)
 import Control.Monad                                 (filterM, forM, when)
 import Data.Char                                     (isSpace)
 import Data.List                                     (partition)
-import System.Directory                              (removeFile, renameFile)
+import System.Directory                              (renameFile)
 import System.FilePath                               ((<.>), (</>))
 
 import Distribution.Compiler                         (CompilerId)
@@ -46,7 +46,7 @@ import Distribution.Client.Sandbox.Index
 import Distribution.Client.SetupWrapper              (SetupScriptOptions (..),
                                                       defaultSetupScriptOptions,
                                                       setupWrapper)
-import Distribution.Client.Utils                     (inDir,
+import Distribution.Client.Utils                     (inDir, removeExistingFile,
                                                       tryCanonicalizePath)
 
 import Distribution.Compat.Exception                 (catchIO)
@@ -228,7 +228,7 @@ allPackageSourceFiles verbosity packageDir = inDir (Just packageDir) $ do
         }
 
   -- Run setup sdist --list-sources=TMPFILE
-  (flip finally) (removeFile file) $ do
+  (flip finally) (removeExistingFile file) $ do
     setupWrapper verbosity setupOpts (Just pkg) sdistCommand (const flags) []
     srcs <- fmap lines . readFile $ file
     mapM tryCanonicalizePath srcs





More information about the ghc-commits mailing list