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
Fix#174 by guaranteeing that iff a bracket body handler completes
uninterrupted (e.g. if masked, or simply no interrupts,) it *will*
call the 'completed' handler of the surrounding bracket.
This effectively allows writing code like this:
```purescript
bracket (liftEffect $ Ref.new Nothing)
{ completed: \a ref ->
liftEffect $ Ref.write (Just a) ref
, killed: \_ _ -> ...
, failed: \_ _ -> ...
} \_ -> action
```
We can effectively reason about the fact that, should `action` ever
complete, we *will* run the completion handler. Currently, if `action`
is masked, and thus guaranteed to succeed, we invoke the 'killed' handler,
thus denying us the possibily of obtaining 'a', even if it was produced.
0 commit comments