summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorM Farkas-Dyck <strake888@proton.me>2022-10-13 18:35:24 -0800
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-10-21 13:23:51 -0400
commit881720697d7d3297120a56a74e2a94e938d6aaa1 (patch)
treeea2eccd1146292158e297b574cb262dd0e54ff9e
parent09ec7de23ea826cb7ac25cb96a214808693de377 (diff)
downloadhaskell-881720697d7d3297120a56a74e2a94e938d6aaa1.tar.gz
Delete `eqExpr`, since GHC 9.4 has been released.
-rw-r--r--compiler/GHC/Core/Map/Type.hs6
-rw-r--r--compiler/GHC/Core/Opt/CSE.hs2
-rw-r--r--compiler/GHC/Core/Utils.hs10
3 files changed, 5 insertions, 13 deletions
diff --git a/compiler/GHC/Core/Map/Type.hs b/compiler/GHC/Core/Map/Type.hs
index 08d7fcf4e0..45468e654f 100644
--- a/compiler/GHC/Core/Map/Type.hs
+++ b/compiler/GHC/Core/Map/Type.hs
@@ -211,10 +211,10 @@ However, the odds that we have two expressions that are identical save for the
'Type'/'Constraint' distinction are low. (Not impossible to do. But doubtful
anyone has ever done so in the history of Haskell.)
-And it's actually all OK: 'eqExpr' is conservative: if `eqExpr e1 e2` returns
+And it's actually all OK: 'eqCoreExpr' is conservative: if `eqCoreExpr e1 e2` returns
'True', thne it must be that `e1` behaves identically to `e2` in all contexts.
-But if `eqExpr e1 e2` returns 'False', then we learn nothing. The use of
-'tcView' where we expect 'coreView' means 'eqExpr' returns 'False' bit more
+But if `eqCoreExpr e1 e2` returns 'False', then we learn nothing. The use of
+'tcView' where we expect 'coreView' means 'eqCoreExpr' returns 'False' bit more
often that it should. This might, say, stop a `RULE` from firing or CSE from
optimizing an expression. Stopping `RULE` firing is good actually: `RULES` are
written in Haskell, where `Type /= Constraint`. Stopping CSE is unfortunate,
diff --git a/compiler/GHC/Core/Opt/CSE.hs b/compiler/GHC/Core/Opt/CSE.hs
index 64f845cc54..f8a129de85 100644
--- a/compiler/GHC/Core/Opt/CSE.hs
+++ b/compiler/GHC/Core/Opt/CSE.hs
@@ -817,7 +817,7 @@ to transform
W y z -> e2
In the simplifier we use cheapEqExpr, because it is called a lot.
-But here in CSE we use the full eqExpr. After all, two alternatives usually
+But here in CSE we use the full eqCoreExpr. After all, two alternatives usually
differ near the root, so it probably isn't expensive to compare the full
alternative. It seems like the same kind of thing that CSE is supposed
to be doing, which is why I put it here.
diff --git a/compiler/GHC/Core/Utils.hs b/compiler/GHC/Core/Utils.hs
index 2dc3432ddd..b97200909f 100644
--- a/compiler/GHC/Core/Utils.hs
+++ b/compiler/GHC/Core/Utils.hs
@@ -34,8 +34,7 @@ module GHC.Core.Utils (
altsAreExhaustive, etaExpansionTick,
-- * Equality
- cheapEqExpr, cheapEqExpr', eqExpr,
- diffBinds,
+ cheapEqExpr, cheapEqExpr', diffBinds,
-- * Manipulating data constructors and types
exprToType,
@@ -79,7 +78,6 @@ import GHC.Core.Coercion
import GHC.Core.Reduction
import GHC.Core.TyCon
import GHC.Core.Multiplicity
-import GHC.Core.Map.Expr ( eqCoreExpr )
import GHC.Builtin.Names ( makeStaticName, unsafeEqualityProofIdKey )
import GHC.Builtin.PrimOps
@@ -2121,12 +2119,6 @@ cheapEqExpr' ignoreTick e1 e2
-eqExpr :: InScopeSet -> CoreExpr -> CoreExpr -> Bool
--- Compares for equality, modulo alpha
--- TODO: remove eqExpr once GHC 9.4 is released
-eqExpr _ = eqCoreExpr
-{-# DEPRECATED eqExpr "Use 'GHC.Core.Map.Expr.eqCoreExpr', 'eqExpr' will be removed in GHC 9.6" #-}
-
-- Used by diffBinds, which is itself only used in GHC.Core.Lint.lintAnnots
eqTickish :: RnEnv2 -> CoreTickish -> CoreTickish -> Bool
eqTickish env (Breakpoint lext lid lids) (Breakpoint rext rid rids)