diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2021-08-18 11:22:32 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2021-08-18 11:26:03 +0100 |
commit | 0237730b40dc6120667260011bc54175cf52f363 (patch) | |
tree | 853e03417f08b623d2cfb2fbebac872a31031270 /compiler/GHC/Core/SimpleOpt.hs | |
parent | 0ba21dbe28882d506c3536c40224ebff337a9f49 (diff) | |
download | haskell-wip/T20200a.tar.gz |
Get the in-scope set right during RULE matchingwip/T20200a
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.
Diffstat (limited to 'compiler/GHC/Core/SimpleOpt.hs')
-rw-r--r-- | compiler/GHC/Core/SimpleOpt.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/GHC/Core/SimpleOpt.hs b/compiler/GHC/Core/SimpleOpt.hs index 40e9f138b7..d741aa0351 100644 --- a/compiler/GHC/Core/SimpleOpt.hs +++ b/compiler/GHC/Core/SimpleOpt.hs @@ -1327,8 +1327,9 @@ Currently, it is used in GHC.Core.Rules.match, and is required to make "map coerce = coerce" match. -} -exprIsLambda_maybe :: InScopeEnv -> CoreExpr - -> Maybe (Var, CoreExpr,[CoreTickish]) +exprIsLambda_maybe :: HasDebugCallStack + => InScopeEnv -> CoreExpr + -> Maybe (Var, CoreExpr,[CoreTickish]) -- See Note [exprIsLambda_maybe] -- The simple case: It is a lambda already |