Get the in-scope set right during RULE matching
There was a subtle error in the in-scope set during RULE matching, which led to #20200 (not the original report, but the reports of failures following an initial bug-fix commit). This patch fixes the problem, and simplifies the code a bit. In pariticular there was a very mysterious and ad-hoc in-scope set extension in rnMatchBndr2, which is now moved to the right place, namely in the Let case of match, where we do the floating. I don't have a small repro case, alas. (cherry picked from commit 4ff4d434)
Showing
- compiler/GHC/Core/Opt/Arity.hs 1 addition, 1 deletioncompiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Rules.hs 18 additions, 19 deletionscompiler/GHC/Core/Rules.hs
- compiler/GHC/Core/SimpleOpt.hs 3 additions, 2 deletionscompiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/Subst.hs 1 addition, 7 deletionscompiler/GHC/Core/Subst.hs
- compiler/GHC/Types/Var/Env.hs 5 additions, 5 deletionscompiler/GHC/Types/Var/Env.hs
Loading
Please register or sign in to comment