[Git][ghc/ghc][wip/T23102] Simplifier: `countValArgs` should not count Type args (#23102)
Sebastian Graf (@sgraf812)
gitlab at gitlab.haskell.org
Sat Mar 11 09:46:29 UTC 2023
Sebastian Graf pushed to branch wip/T23102 at Glasgow Haskell Compiler / GHC
Commits:
079badf0 by Sebastian Graf at 2023-03-11T10:44:21+01:00
Simplifier: `countValArgs` should not count Type args (#23102)
I observed miscompilations while working on !10088 caused by this.
Fixes #23102.
Metric Decrease:
T10421
- - - - -
1 changed file:
- compiler/GHC/Core/Opt/Simplify/Utils.hs
Changes:
=====================================
compiler/GHC/Core/Opt/Simplify/Utils.hs
=====================================
@@ -553,7 +553,7 @@ countArgs _ = 0
countValArgs :: SimplCont -> Int
-- Count value arguments only
-countValArgs (ApplyToTy { sc_cont = cont }) = 1 + countValArgs cont
+countValArgs (ApplyToTy { sc_cont = cont }) = countValArgs cont
countValArgs (ApplyToVal { sc_cont = cont }) = 1 + countValArgs cont
countValArgs (CastIt _ cont) = countValArgs cont
countValArgs _ = 0
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/079badf009115b7d1d2175ec3aaaf01c6803bd4f
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/079badf009115b7d1d2175ec3aaaf01c6803bd4f
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/20230311/c8497ed5/attachment.html>
More information about the ghc-commits
mailing list