Change catch# demand signature
authorDavid Feuer <david.feuer@gmail.com>
Wed, 1 Mar 2017 06:14:13 +0000 (01:14 -0500)
committerDavid Feuer <David.Feuer@gmail.com>
Wed, 1 Mar 2017 06:14:14 +0000 (01:14 -0500)
commit701256df88c61a2eee4cf00a59e61ef76a57b4b4
tree390d51339bff6fb8d5369ec55a7d3cdc2fb5bb57
parentb86d226fda2f512178e04da4dec96b15c4480507
Change catch# demand signature

* Give `catch#` a lazy demand signature, to make it more honest.

* Make `catchException` and `catchAny` force their arguments so they
actually behave as advertised.

* Use `catch` rather than `catchException` in `forkIO`, `forkOn`, and
`forkOS` to avoid losing exceptions.

Fixes #13330

Reviewers: rwbarton, simonpj, simonmar, bgamari, hvr, austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D3244
compiler/basicTypes/Demand.hs
compiler/prelude/primops.txt.pp
libraries/base/Control/Concurrent.hs
libraries/base/Control/Exception/Base.hs
libraries/base/GHC/Conc/Sync.hs
libraries/base/GHC/Foreign.hs
libraries/base/GHC/IO.hs
testsuite/tests/concurrent/should_run/T13330.hs [new file with mode: 0644]
testsuite/tests/concurrent/should_run/T13330.stderr [new file with mode: 0644]
testsuite/tests/concurrent/should_run/all.T