summaryrefslogtreecommitdiff
path: root/testsuite/tests/deSugar
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2019-09-13 09:46:17 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-10-01 16:55:37 -0400
commit8924224ecfa065ebc67b96a90d01cf9d2edd0e77 (patch)
tree4701376daaa5c7f29a63a4642934e7b9953c9b5d /testsuite/tests/deSugar
parent0956c1941bbd80fb6218b4ddeb0e9bd822d71855 (diff)
downloadhaskell-8924224ecfa065ebc67b96a90d01cf9d2edd0e77.tar.gz
Make small INLINE functions behave properly
Simon writes: Currently we check for a type arg rather than isTyCoArg. This in turn makes INLINE things look bigger than they should be, and stops them being inlined into boring contexts when they perfectly well could be. E.g. f x = g <refl> x {-# INLINE g #-} ... (map (f x) xs) ... The context is boring, so don't inline unconditionally. But f's RHS is no bigger than its call, provided you realise that the coercion argument is ultimately cost-free. This happens in practice for $WHRefl. It's not a big deal: at most it means we have an extra function call overhead. But it's untidy, and actually worse than what happens without an INLINE pragma. Fixes #17182 This makes 0.0% change in nofib binary sizes.
Diffstat (limited to 'testsuite/tests/deSugar')
-rw-r--r--testsuite/tests/deSugar/should_compile/T2431.stderr5
1 files changed, 4 insertions, 1 deletions
diff --git a/testsuite/tests/deSugar/should_compile/T2431.stderr b/testsuite/tests/deSugar/should_compile/T2431.stderr
index 30b5f8c358..92d99a8d14 100644
--- a/testsuite/tests/deSugar/should_compile/T2431.stderr
+++ b/testsuite/tests/deSugar/should_compile/T2431.stderr
@@ -10,7 +10,7 @@ T2431.$WRefl [InlPrag=INLINE[0]] :: forall a. a :~: a
Str=m,
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
- Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=False)
+ Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=True)
Tmpl= \ (@ a) -> T2431.Refl @ a @ a @~ (<a>_N :: a GHC.Prim.~# a)}]
T2431.$WRefl
= \ (@ a) -> T2431.Refl @ a @ a @~ (<a>_N :: a GHC.Prim.~# a)
@@ -110,3 +110,6 @@ T2431.$tc'Refl
$tc'Refl2
1#
$krep3
+
+
+