diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2022-06-28 15:06:16 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2022-07-07 12:02:02 +0100 |
commit | 67c9fee8910e4549d73d6c468bfbd76350df41fb (patch) | |
tree | c380a08204e9191a9fd3c79e58fab4c0b9a3c7a8 /compiler/GHC/Core/Rules.hs | |
parent | bbcaba6a0951d45ae0ceb309da5458fc20332511 (diff) | |
download | haskell-wip/T21828.tar.gz |
Fix a scoping bug in the Specialiserwip/T21828
In the call to `specLookupRule` in `already_covered`, in `specCalls`,
we need an in-scope set that includes the free vars of the arguments.
But we simply were not guaranteeing that: did not include the
`rule_bndrs`.
Easily fixed. I'm not sure how how this bug has lain for quite
so long without biting us.
Fixes #21828.
Diffstat (limited to 'compiler/GHC/Core/Rules.hs')
-rw-r--r-- | compiler/GHC/Core/Rules.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Core/Rules.hs b/compiler/GHC/Core/Rules.hs index 451d1ac5c1..444ed1e50b 100644 --- a/compiler/GHC/Core/Rules.hs +++ b/compiler/GHC/Core/Rules.hs @@ -395,7 +395,7 @@ lookupRule :: RuleOpts -> InScopeEnv -- See Note [Extra args in the target] -- See comments on matchRule lookupRule opts rule_env@(in_scope,_) is_active fn args rules - = -- pprTrace "matchRules" (ppr fn <+> ppr args $$ ppr rules ) $ + = -- pprTrace "lookupRule" (ppr fn <+> ppr args $$ ppr rules $$ ppr in_scope) $ case go [] rules of [] -> Nothing (m:ms) -> Just (findBest in_scope (fn,args') m ms) |