diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2021-05-04 08:29:21 +0100 |
---|---|---|
committer | Simon Peyton Jones <simon.peytonjones@gmail.com> | 2022-01-26 09:33:19 +0000 |
commit | 9041cd4588ccd2e9304e2751845474c8f4b4d0d9 (patch) | |
tree | 79f50f16a5f885acb794e318a39221c179e293aa /compiler/GHC/Core/Coercion.hs | |
parent | 781323a3076781b5db50bdbeb8f64394add43836 (diff) | |
download | haskell-wip/T19790a.tar.gz |
Make RULE matching insensitive to eta-expansionwip/T19790a
This patch fixes #19790 by making the rule matcher do on-the-fly
eta reduction. See Note [Eta reduction the target] in GHC.Core.Rules
I found I also had to careful about casts when matching; see
Note [Casts in the target] and Note [Casts in the template]
Lots more comments and Notes in the rule matcher
Diffstat (limited to 'compiler/GHC/Core/Coercion.hs')
-rw-r--r-- | compiler/GHC/Core/Coercion.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Core/Coercion.hs b/compiler/GHC/Core/Coercion.hs index 69ce993d14..f54d364359 100644 --- a/compiler/GHC/Core/Coercion.hs +++ b/compiler/GHC/Core/Coercion.hs @@ -338,7 +338,7 @@ mkTransMCo co1 MRefl = co1 mkTransMCo (MCo co1) (MCo co2) = MCo (mkTransCo co1 co2) mkTransMCoL :: MCoercion -> Coercion -> MCoercion -mkTransMCoL MRefl co2 = MCo co2 +mkTransMCoL MRefl co2 = coToMCo co2 mkTransMCoL (MCo co1) co2 = MCo (mkTransCo co1 co2) mkTransMCoR :: Coercion -> MCoercion -> MCoercion |