diff options
author | Simon Peyton Jones <simon.peytonjones@gmail.com> | 2023-01-26 15:35:41 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-01-30 21:20:35 -0500 |
commit | d0f34f25ceaae9ef0a21f15f811469d0bed9da69 (patch) | |
tree | c42d57f585cef54e0a9e2a52956d45eadb949ade /testsuite/tests/simplCore/should_compile/T17787.hs | |
parent | 2f1450521b816a7d287b72deba14d59b6ccfbdbf (diff) | |
download | haskell-d0f34f25ceaae9ef0a21f15f811469d0bed9da69.tar.gz |
Take account of loop breakers in specLookupRule
The key change is that in GHC.Core.Opt.Specialise.specLookupRule
we were using realIdUnfolding, which ignores the loop-breaker
flag. When given a loop breaker, rule matching therefore
looped infinitely -- #22802.
In fixing this I refactored a bit.
* Define GHC.Core.InScopeEnv as a data type, and use it.
(Previously it was a pair: hard to grep for.)
* Put several functions returning an IdUnfoldingFun into
GHC.Types.Id, namely
idUnfolding
alwaysActiveUnfoldingFun,
whenActiveUnfoldingFun,
noUnfoldingFun
and use them. (The are all loop-breaker aware.)
Diffstat (limited to 'testsuite/tests/simplCore/should_compile/T17787.hs')
0 files changed, 0 insertions, 0 deletions