summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Graf <sebastian.graf@kit.edu>2023-03-10 18:25:12 +0100
committerSebastian Graf <sebastian.graf@kit.edu>2023-03-11 10:44:21 +0100
commit079badf009115b7d1d2175ec3aaaf01c6803bd4f (patch)
tree07e07475a231e2d0324bb4b721c8c49768189135
parent9ea719f2f1929bf2b789e4001f6c542a04185d61 (diff)
downloadhaskell-wip/T23102.tar.gz
Simplifier: `countValArgs` should not count Type args (#23102)wip/T23102
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 ffecebd876..9836557e8d 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