Harden fixST
authorDavid Feuer <david.feuer@gmail.com>
Sat, 21 Jul 2018 19:45:35 +0000 (15:45 -0400)
committerDavid Feuer <David.Feuer@gmail.com>
Sat, 21 Jul 2018 19:45:36 +0000 (15:45 -0400)
commit5a49651f3161473b383ec497af38e9daa022b9ac
tree4d9f2ab8f2520ab48deac550af7d232553894e1b
parentb202e7a48401bd8e805a92dcfe5ea059cbd8e41c
Harden fixST

Trac #15349 reveals that lazy blackholing can cause trouble for
`fixST` much like it can for `fixIO`. Make `fixST` work just
like `fixIO`.

Reviewers: simonmar, hvr, bgamari

Reviewed By: simonmar

Subscribers: rwbarton, thomie, carter

GHC Trac Issues: #15349

Differential Revision: https://phabricator.haskell.org/D4948
libraries/base/Control/Monad/Fix.hs
libraries/base/Control/Monad/ST/Imp.hs
libraries/base/GHC/ST.hs
libraries/base/tests/T15349.hs [new file with mode: 0644]
libraries/base/tests/T15349.stderr [new file with mode: 0644]
libraries/base/tests/all.T