Improve error msg for simplifier tick exhaustion
authorDavid Feuer <david.feuer@gmail.com>
Fri, 19 May 2017 22:09:43 +0000 (18:09 -0400)
committerDavid Feuer <David.Feuer@gmail.com>
Fri, 19 May 2017 22:09:44 +0000 (18:09 -0400)
commit40210c3637d7ac066e0d98c33612b57725708216
tree8cd07f5f33d6ac8aa27375aa7c8e00de8d63f616
parent4e0e120bcbda6c5351d7c5aa01f7298e2198d457
Improve error msg for simplifier tick exhaustion

Simplifier tick exhaustion is not necessarily "impossible", and
isn't even always a GHC bug, per se. Improve the error message.
Furthermore, the simplifier code has access to `IO`, so we can
throw a proper `IO` exception instead of panicking.

Reviewers: austin, bgamari, angerman

Reviewed By: angerman

Subscribers: angerman, rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3597
compiler/simplCore/SimplMonad.hs