Fix compilation error with exceptions-0.9.0

This commit is contained in:
Michael Walker 2018-03-08 22:51:20 +00:00
parent 87f9de4851
commit 67400d08b5

View File

@ -134,9 +134,9 @@ instance Ca.MonadMask (ConcT r n) where
#if MIN_VERSION_exceptions(0,9,0)
-- from https://github.com/fpco/stackage/issues/3315#issuecomment-368583481
generalBracket acquire release cleanup use = mask $ \unmasked -> do
generalBracket acquire release cleanup use = Ca.mask $ \unmasked -> do
resource <- acquire
result <- unmasked (use resource) `catch` (\e -> cleanup resource e >> throwM e)
result <- unmasked (use resource) `Ca.catch` (\e -> cleanup resource e >> Ca.throwM e)
_ <- release resource
pure result
#endif