summaryrefslogtreecommitdiff
path: root/Upgrade/V1.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-02-03 16:47:24 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-02-03 16:47:24 -0400
commit146c36ca545a297f1e44e3cf2c91f3c0e17c909f (patch)
tree56d6fb274427bb793155182aed7e92e2e00895ba /Upgrade/V1.hs
parent05f89123e08075cfbd136f37c60423c1ad38d1fe (diff)
IO exception rework
ghc 7.4 comaplains about use of System.IO.Error to catch exceptions. Ok, use Control.Exception, with variants specialized to only catch IO exceptions.
Diffstat (limited to 'Upgrade/V1.hs')
-rw-r--r--Upgrade/V1.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Upgrade/V1.hs b/Upgrade/V1.hs
index add50fcf3..ca2bff661 100644
--- a/Upgrade/V1.hs
+++ b/Upgrade/V1.hs
@@ -7,7 +7,6 @@
module Upgrade.V1 where
-import System.IO.Error (try)
import System.Posix.Types
import Data.Char
@@ -183,7 +182,7 @@ readLog1 file = catchDefaultIO (parseLog <$> readFileStrict file) []
lookupFile1 :: FilePath -> Annex (Maybe (Key, Backend))
lookupFile1 file = do
- tl <- liftIO $ try getsymlink
+ tl <- liftIO $ tryIO getsymlink
case tl of
Left _ -> return Nothing
Right l -> makekey l
@@ -216,7 +215,7 @@ getKeyFilesPresent1' dir = do
liftIO $ filterM present files
where
present f = do
- result <- try $ getFileStatus f
+ result <- tryIO $ getFileStatus f
case result of
Right s -> return $ isRegularFile s
Left _ -> return False