[Git][ghc/ghc][master] Delete `eqExpr`, since GHC 9.4 has been released.

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Fri Oct 21 17:24:06 UTC 2022



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
88172069 by M Farkas-Dyck at 2022-10-21T13:23:51-04:00
Delete `eqExpr`, since GHC 9.4 has been released.

- - - - -


3 changed files:

- compiler/GHC/Core/Map/Type.hs
- compiler/GHC/Core/Opt/CSE.hs
- compiler/GHC/Core/Utils.hs


Changes:

=====================================
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,


=====================================
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.


=====================================
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)



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/881720697d7d3297120a56a74e2a94e938d6aaa1

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/881720697d7d3297120a56a74e2a94e938d6aaa1
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221021/dc84fac7/attachment-0001.html>


More information about the ghc-commits mailing list