simplCore: Ensure that rule templates contain no ticks
This fixes #17619, where a tick snuck in to the template of a rule, resulting in a panic during rule matching. The situation is summarized in `Note [Rule templates are devoid of ticks]`. In short, we ensure that the template remains devoid of ticks by stripping ticks after substitution. This feels a bit hacky but I can't think of a better option at the moment. We also now assert this invariant in Core Lint.
parent
e2ae6fbe
Pipeline #14060 failed
Stage: lint
Stage: quick-build
Stage: build
Stage: full-build
Stage: cleanup
Stage: packaging
Stage: testing
Showing
- compiler/coreSyn/CoreLint.hs 7 additions, 0 deletionscompiler/coreSyn/CoreLint.hs
- compiler/coreSyn/CoreSubst.hs 2 additions, 1 deletioncompiler/coreSyn/CoreSubst.hs
- compiler/simplCore/Simplify.hs 2 additions, 1 deletioncompiler/simplCore/Simplify.hs
- compiler/specialise/Rules.hs 18 additions, 0 deletionscompiler/specialise/Rules.hs
Loading
Please register or sign in to comment