Make `catch` lazy in the action
Previously ```lang=haskell catch (error "uh oh") (\(_ :: SomeException) -> print "it failed") ``` would unexpectedly fail with "uh oh" instead of the handler being run due to the strictness of `catch` in its first argument. See #11555 for details. Test Plan: Validate Reviewers: austin, hvr, simonpj Reviewed By: simonpj Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D1973 GHC Trac Issues: #11555
Showing
- libraries/base/Control/Exception/Base.hs 1 addition, 1 deletionlibraries/base/Control/Exception/Base.hs
- libraries/base/GHC/IO.hs 39 additions, 0 deletionslibraries/base/GHC/IO.hs
- libraries/base/tests/.gitignore 1 addition, 0 deletionslibraries/base/tests/.gitignore
- libraries/base/tests/T11555.hs 9 additions, 0 deletionslibraries/base/tests/T11555.hs
- libraries/base/tests/T11555.stdout 1 addition, 0 deletionslibraries/base/tests/T11555.stdout
- libraries/base/tests/all.T 1 addition, 0 deletionslibraries/base/tests/all.T
libraries/base/tests/T11555.hs
0 → 100644
libraries/base/tests/T11555.stdout
0 → 100644
Please register or sign in to comment