Commit 239a6f30 authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Unbreak the build on GHC <= 7.4.

Fixes #1494.
parent b7aabdda
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment