Fix these tests
[haskell-directory.git] / tests / copyFile001.hs
index e279dd0..e039bec 100644 (file)
@@ -7,7 +7,7 @@ import System.Directory
 import System.IO
 
 main :: IO ()
-main = do ignoreExceptions $ removeFile to
+main = do tryIO $ removeFile to
           cs_before <- getDirectoryContents "copyFile"
           putStrLn "Before:"
           print $ sort cs_before
@@ -17,6 +17,9 @@ main = do ignoreExceptions $ removeFile to
           print $ sort cs_before
           readFile to >>= print
 
+tryIO :: IO a -> IO (Either IOException a)
+tryIO = try 
+
 from, to :: FilePath
 from = "copyFile/source"
 to   = "copyFile/target"