Commit a05d6183 authored by refold's avatar refold
Browse files

Fix warnings.

parent 8554d646
......@@ -71,6 +71,7 @@ import System.FilePath.Posix as FilePath.Posix
import System.IO
import System.IO.Unsafe (unsafeInterleaveIO)
import System.IO.Error (isDoesNotExistError)
import Distribution.Compat.Exception (catchIO)
import System.Directory
( getModificationTime, doesFileExist )
import System.Time
......@@ -177,7 +178,7 @@ readRepoIndex verbosity repo =
packageSource = RepoTarballPackage repo pkgid Nothing
}
handleNotFound action = catch action $ \e -> if isDoesNotExistError e
handleNotFound action = catchIO action $ \e -> if isDoesNotExistError e
then do
case repoKind repo of
Left remoteRepo -> warn verbosity $
......
......@@ -67,9 +67,10 @@ import System.Directory
import System.FilePath
( (</>), splitPath, joinPath, isAbsolute )
import Prelude hiding (catch, ioError)
import Prelude hiding (ioError)
import System.IO.Error
( catch, isDoesNotExistError, ioError )
( isDoesNotExistError, ioError )
import Distribution.Compat.Exception ( catchIO )
import Control.Exception
( assert )
import Data.Maybe
......@@ -209,7 +210,7 @@ targetOkToOverwrite symlink target = handleNotExist $ do
else return NotOurFile
where
handleNotExist action = catch action $ \ioexception ->
handleNotExist action = catchIO action $ \ioexception ->
-- If the target doesn't exist then there's no problem overwriting it!
if isDoesNotExistError ioexception
then return NotExists
......
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