Let GHC know MutVar# ops can't fail
authorDavid Feuer <david.feuer@gmail.com>
Tue, 21 Mar 2017 04:12:07 +0000 (00:12 -0400)
committerDavid Feuer <David.Feuer@gmail.com>
Tue, 21 Mar 2017 04:22:51 +0000 (00:22 -0400)
commit2ac13c132d039438382baef6ce52c79b29725145
tree08ff2083ba3b58360e1292820596263dc12fd058
parente0eaea918c32b3aa445708656876d1e2aef94a13
Let GHC know MutVar# ops can't fail

The only way `readMutVar#` or `writeMutVar#` can fail is if its
argument is not a valid pointer. I believe we ensure this by
construction, and never test for pointer validity. So I think it
should be safe to say that it can't fail.

Fixes #13424

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3340
compiler/prelude/primops.txt.pp