mirror of
https://github.com/barrucadu/dejafu.git
synced 2024-12-29 00:22:38 +03:00
Fix compilation error with exceptions-0.9.0
This commit is contained in:
parent
87f9de4851
commit
67400d08b5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user