summaryrefslogtreecommitdiff
path: root/compiler/GHC/HsToCore/Utils.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-04-19 11:16:32 -0400
committerBen Gamari <ben@smart-cactus.org>2020-05-22 15:14:51 -0400
commit5a2cdd5c2f69992a59fa57b9dc46f6ed71864ef6 (patch)
tree041d5ae04a2f37d0d9b27cd932d7fbe80ba49af4 /compiler/GHC/HsToCore/Utils.hs
parent31f1c568e7c9562d58ae10dbcd74d67da8156021 (diff)
downloadhaskell-wip/runRW.tar.gz
Allow simplification through runRW#wip/runRW
Because runRW# inlines so late, we were previously able to do very little simplification across it. For instance, given even a simple program like case runRW# (\s -> let n = I# 42# in n) of I# n# -> f n# we previously had no way to avoid the allocation of the I#. This patch allows the simplifier to push strict contexts into the continuation of a runRW# application, as explained in in Note [Simplification of runRW#] in GHC.CoreToStg.Prep. Fixes #15127. Metric Increase: T9961 Metric Decrease: ManyConstructors Co-Authored-By: Simon Peyton-Jone <simonpj@microsoft.com>
Diffstat (limited to 'compiler/GHC/HsToCore/Utils.hs')
-rw-r--r--compiler/GHC/HsToCore/Utils.hs1
1 files changed, 0 insertions, 1 deletions
diff --git a/compiler/GHC/HsToCore/Utils.hs b/compiler/GHC/HsToCore/Utils.hs
index 48673a18d5..194cf4e1ac 100644
--- a/compiler/GHC/HsToCore/Utils.hs
+++ b/compiler/GHC/HsToCore/Utils.hs
@@ -482,7 +482,6 @@ mkCoreAppDs _ (Var f `App` Type _r `App` Type ty1 `App` Type ty2 `App` arg1) arg
Var v1 | isInternalName (idName v1)
-> v1 -- Note [Desugaring seq], points (2) and (3)
_ -> mkWildValBinder ty1
-
mkCoreAppDs s fun arg = mkCoreApp s fun arg -- The rest is done in GHC.Core.Make
-- NB: No argument can be levity polymorphic