You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the current version (0.1.7.1), this test fails with expected: "resource released", but got: "resource used".
Since finally and bracket are written as special cases of bracketOnError, they get affected by this bug as well.
As this library is using exceptions's monad typeclasses, I think this function should be re-written in terms of generalBracket, so that it would handle the ExceptT transformer too.
The text was updated successfully, but these errors were encountered:
safe-exceptions/src/Control/Exception/Safe.hs
Lines 428 to 449 in 9d8baf8
If the underlying monad is
ExceptT
, and the interior action performsthrowError
, then the release action gets skipped.This can be checked with this test:
With the current version (0.1.7.1), this test fails with
expected: "resource released", but got: "resource used"
.Since
finally
andbracket
are written as special cases ofbracketOnError
, they get affected by this bug as well.As this library is using
exceptions
's monad typeclasses, I think this function should be re-written in terms ofgeneralBracket
, so that it would handle theExceptT
transformer too.The text was updated successfully, but these errors were encountered: