Fix Trac #4345: simplifier bug
authorsimonpj@microsoft.com <unknown>
Thu, 7 Oct 2010 10:27:20 +0000 (10:27 +0000)
committersimonpj@microsoft.com <unknown>
Thu, 7 Oct 2010 10:27:20 +0000 (10:27 +0000)
commit5c248c7dfa9b789df31ca5186c4f181f1e8eb42b
treea1b7d1166cb55e53eec32dd85583f437dfdd262f
parentfb982282ff6307b342d8fbc09b58a990d76c68fb
Fix Trac #4345: simplifier bug

This is another long-standing bug, in which there was a possibility
that a loop-breaker could lose its loop-breaker-hood OccInfo,
and then the simplifer re-simplified the expression. Result, either
non-termination or, in the case of #4345, an unbound identifier.

The fix is very simple, in Id.transferPolyIdInfo.
See Note [transferPolyIdInfo].
compiler/basicTypes/Id.lhs