Repository : ssh://darcs.haskell.org//srv/darcs/packages/directory

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/07c29506881ba7c21ecdba9cc83c18dec70f8469

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

commit 07c29506881ba7c21ecdba9cc83c18dec70f8469
Author: Ian Lynagh <[email protected]>
Date:   Tue Jun 19 22:53:38 2012 +0100

    Follow changes in base

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

 System/Directory.hs |   19 +++++++------------
 directory.cabal     |    2 +-
 2 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/System/Directory.hs b/System/Directory.hs
index 18eeba6..1e44248 100644
--- a/System/Directory.hs
+++ b/System/Directory.hs
@@ -79,14 +79,11 @@ module System.Directory
     , getModificationTime
    ) where
 
-import Prelude hiding ( catch )
-import qualified Prelude
-
 import Control.Monad (guard)
 import System.Environment      ( getEnv )
 import System.FilePath
 import System.IO
-import System.IO.Error hiding ( catch, try )
+import System.IO.Error
 import Control.Monad           ( when, unless )
 import Control.Exception.Base
 
@@ -685,11 +682,11 @@ copyFile :: FilePath -> FilePath -> IO ()
 #ifdef __NHC__
 copyFile fromFPath toFPath =
     do readFile fromFPath >>= writeFile toFPath
-       Prelude.catch (copyPermissions fromFPath toFPath)
-                     (\_ -> return ())
+       catchIOError (copyPermissions fromFPath toFPath)
+                    (\_ -> return ())
 #else
 copyFile fromFPath toFPath =
-    copy `Prelude.catch` (\exc -> throw $ ioeSetLocation exc "copyFile")
+    copy `catchIOError` (\exc -> throw $ ioeSetLocation exc "copyFile")
     where copy = bracket (openBinaryFile fromFPath ReadMode) hClose $ \hFrom ->
                  bracketOnError openTmp cleanTmp $ \(tmpFPath, hTmp) ->
                  do allocaBytes bufferSize $ copyContents hFrom hTmp
@@ -708,9 +705,7 @@ copyFile fromFPath toFPath =
                           hPutBuf hTo buffer count
                           copyContents hFrom hTo buffer
 
-          ignoreIOExceptions io = io `catch` ioExceptionIgnorer
-          ioExceptionIgnorer :: IOException -> IO ()
-          ioExceptionIgnorer _ = return ()
+          ignoreIOExceptions io = io `catchIOError` (\_ -> return ())
 #endif
 
 -- | Given path referring to a file or directory, returns a
@@ -1189,10 +1184,10 @@ getTemporaryDirectory = do
 #else
   getEnv "TMPDIR"
 #if !__NHC__
-    `Prelude.catch` \e -> if isDoesNotExistError e then return "/tmp"
+    `catchIOError` \e -> if isDoesNotExistError e then return "/tmp"
                           else throw e
 #else
-    `Prelude.catch` (\ex -> return "/tmp")
+    `catchIOError` (\ex -> return "/tmp")
 #endif
 #endif
 
diff --git a/directory.cabal b/directory.cabal
index a6e92f4..e41de81 100644
--- a/directory.cabal
+++ b/directory.cabal
@@ -32,7 +32,7 @@ Library {
     extensions: CPP, ForeignFunctionInterface
     if impl(ghc >= 7.1)
         extensions: NondecreasingIndentation
-    build-depends: base >= 4.2 && < 4.6,
+    build-depends: base >= 4.2 && < 4.7,
                    time < 1.5,
                    filepath >= 1.1 && < 1.3
     if !impl(nhc98) {



_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to