diff options
author | Joey Hess <joey@kitenet.net> | 2013-05-25 15:22:18 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-05-25 15:22:18 -0400 |
commit | 770ab040c32ff0f75c54e1975bf784b116c8d584 (patch) | |
tree | cb464beda71e178478f89cc08eea7146e58e3712 /Annex/Exception.hs | |
parent | 4fe58c77f75a5878030df85c75955c94e2e24f88 (diff) | |
parent | f9a9ee1f739843b0b7c12a620d7adb55939bacbc (diff) |
Merge branch 'robustness'
Diffstat (limited to 'Annex/Exception.hs')
-rw-r--r-- | Annex/Exception.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Annex/Exception.hs b/Annex/Exception.hs index f06f568a4..96070ee26 100644 --- a/Annex/Exception.hs +++ b/Annex/Exception.hs @@ -24,9 +24,8 @@ import Control.Exception hiding (handle, try, throw, bracket, catch) import Common.Annex {- Runs an Annex action, with setup and cleanup both in the IO monad. -} -bracketIO :: IO c -> (c -> IO b) -> Annex a -> Annex a -bracketIO setup cleanup go = - bracket (liftIO setup) (liftIO . cleanup) (const go) +bracketIO :: IO v -> (v -> IO b) -> (v -> Annex a) -> Annex a +bracketIO setup cleanup go = bracket (liftIO setup) (liftIO . cleanup) go {- try in the Annex monad -} tryAnnex :: Annex a -> Annex (Either SomeException a) |