summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)