Use exceptions in place of deprecated MonadCatchIO-transformers

This commit is contained in:
Ben Gamari 2014-05-28 17:01:57 -04:00
parent 6e040807dd
commit 99b89b22fd
3 changed files with 7 additions and 5 deletions

View file

@ -33,7 +33,7 @@ module Annex (
) where ) where
import "mtl" Control.Monad.Reader import "mtl" Control.Monad.Reader
import "MonadCatchIO-transformers" Control.Monad.CatchIO import Control.Monad.Catch
import Control.Concurrent import Control.Concurrent
import Common import Common
@ -77,7 +77,9 @@ newtype Annex a = Annex { runAnnex :: ReaderT (MVar AnnexState) IO a }
Monad, Monad,
MonadIO, MonadIO,
MonadReader (MVar AnnexState), MonadReader (MVar AnnexState),
MonadCatchIO, MonadCatch,
MonadThrow,
MonadMask,
Functor, Functor,
Applicative Applicative
) )

View file

@ -21,7 +21,7 @@ module Annex.Exception (
catchAnnex, catchAnnex,
) where ) where
import qualified "MonadCatchIO-transformers" Control.Monad.CatchIO as M import qualified Control.Monad.Catch as M
import Control.Exception import Control.Exception
import Common.Annex import Common.Annex
@ -43,7 +43,7 @@ tryAnnexIO = M.try
{- throw in the Annex monad -} {- throw in the Annex monad -}
throwAnnex :: Exception e => e -> Annex a throwAnnex :: Exception e => e -> Annex a
throwAnnex = M.throw throwAnnex = M.throwM
{- catch in the Annex monad -} {- catch in the Annex monad -}
catchAnnex :: Exception e => Annex a -> (e -> Annex a) -> Annex a catchAnnex :: Exception e => Annex a -> (e -> Annex a) -> Annex a

View file

@ -98,7 +98,7 @@ Executable git-annex
containers, utf8-string, network (>= 2.0), mtl (>= 2), containers, utf8-string, network (>= 2.0), mtl (>= 2),
bytestring, old-locale, time, HTTP, bytestring, old-locale, time, HTTP,
extensible-exceptions, dataenc, SHA, process, json, extensible-exceptions, dataenc, SHA, process, json,
base (>= 4.5 && < 4.9), monad-control, MonadCatchIO-transformers, base (>= 4.5 && < 4.9), monad-control, exceptions,
IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance, process, IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance, process,
SafeSemaphore, uuid, random, dlist, unix-compat, async, stm (>= 2.3), SafeSemaphore, uuid, random, dlist, unix-compat, async, stm (>= 2.3),
data-default, case-insensitive data-default, case-insensitive