summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Graf <sebastian.graf@kit.edu>2023-03-10 18:25:12 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-03-13 07:31:23 -0400
commit559a480427a841b5189f2e6a84a38b02a7c2b8a1 (patch)
tree1f332df18010a303bffd421f78d4a9f68e2d52dc
parent047e9d4f10e4124899887449dc52b9e72a7d3ea6 (diff)
downloadhaskell-559a480427a841b5189f2e6a84a38b02a7c2b8a1.tar.gz
Simplifier: `countValArgs` should not count Type args (#23102)
I observed miscompilations while working on !10088 caused by this. Fixes #23102. Metric Decrease: T10421
-rw-r--r--compiler/GHC/Core/Opt/Simplify/Utils.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Core/Opt/Simplify/Utils.hs b/compiler/GHC/Core/Opt/Simplify/Utils.hs
index 3a1dd75d1f..7eb4692231 100644
--- a/compiler/GHC/Core/Opt/Simplify/Utils.hs
+++ b/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