[Git][ghc/ghc][master] Simplifier: `countValArgs` should not count Type args (#23102)

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon Mar 13 11:31:42 UTC 2023



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


Commits:
559a4804 by Sebastian Graf at 2023-03-13T07:31:23-04: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/559a480427a841b5189f2e6a84a38b02a7c2b8a1

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/559a480427a841b5189f2e6a84a38b02a7c2b8a1
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/20230313/83843c13/attachment.html>


More information about the ghc-commits mailing list