base: Have the argument of mask restore the state.
The implementation of `mask` and `uninterruptibleMask` assumed so far that the restore argument would be called in a context with the same masking state as that set by `mask` or `uninterruptibleMask`. This patch has the restore argument restore the masking, whatever the current masking state is. Test Plan: validate Reviewers: simonmar, hvr, austin, bgamari Reviewed By: bgamari Subscribers: thomie, qnikst Differential Revision: https://phabricator.haskell.org/D1327 GHC Trac Issues: #10149
Showing
- libraries/base/GHC/IO.hs 4 additions, 3 deletionslibraries/base/GHC/IO.hs
- libraries/base/changelog.md 3 additions, 0 deletionslibraries/base/changelog.md
- libraries/base/tests/T10149.hs 19 additions, 0 deletionslibraries/base/tests/T10149.hs
- libraries/base/tests/T10149.stdout 4 additions, 0 deletionslibraries/base/tests/T10149.stdout
- libraries/base/tests/all.T 1 addition, 0 deletionslibraries/base/tests/all.T
Loading
Please register or sign in to comment