[commit: packages/Cabal] ghc-head: Unbreak the build on GHC <= 7.4. (239a6f3)

git at git.haskell.org git at git.haskell.org
Fri Sep 13 17:55:25 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=239a6f309a6e87ba505cbe8efe0424ea1221c2c6

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

commit 239a6f309a6e87ba505cbe8efe0424ea1221c2c6
Author: Mikhail Glushenkov <mikhail.glushenkov at gmail.com>
Date:   Mon Sep 9 07:14:58 2013 +0200

    Unbreak the build on GHC <= 7.4.
    
    Fixes #1494.


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

239a6f309a6e87ba505cbe8efe0424ea1221c2c6
 cabal-install/Distribution/Client/Get.hs |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/cabal-install/Distribution/Client/Get.hs b/cabal-install/Distribution/Client/Get.hs
index 0eabd5b..39c2469 100644
--- a/cabal-install/Distribution/Client/Get.hs
+++ b/cabal-install/Distribution/Client/Get.hs
@@ -37,9 +37,11 @@ import Distribution.Client.FetchUtils
 import qualified Distribution.Client.Tar as Tar (extractTarGzFile)
 import Distribution.Client.IndexUtils as IndexUtils
         ( getSourcePackages )
+import Distribution.Compat.Exception
+        ( catchIO )
 
 import Control.Exception
-         ( catch, finally )
+         ( finally )
 import Control.Monad
          ( filterM, forM_, unless, when )
 import Data.List
@@ -202,7 +204,7 @@ allBranchers =
 -- exits successfully, that brancher is considered usable.
 findUsableBranchers :: IO (Data.Map.Map PD.RepoType Brancher)
 findUsableBranchers = do
-    let usable (_, brancher) = flip catch (const (return False) :: IOError -> IO Bool) $ do
+    let usable (_, brancher) = flip catchIO (const (return False)) $ do
          let cmd = brancherBinary brancher
          (exitCode, _, _) <- readProcessWithExitCode cmd ["--help"] ""
          return (exitCode == ExitSuccess)




More information about the ghc-commits mailing list