summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/T18995.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2020-12-16 12:48:52 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-12-19 02:14:42 -0500
commit173112cad82630b02eb91acb1f5fb91a96fa02b9 (patch)
treec9a154eb05c3189bc53ecf6569b869db6fdce342 /testsuite/tests/simplCore/should_compile/T18995.hs
parentc2430398481f5aab12fd94e6549c7b9bbd1e43fe (diff)
downloadhaskell-173112cad82630b02eb91acb1f5fb91a96fa02b9.tar.gz
Make noinline more reliable
This patch makes the desugarer rewrite noinline (f d) --> noinline f d This makes 'noinline' much more reliable: see #18995 It's explained in the improved Note [noinlineId magic] in GHC.Types.Id.Make
Diffstat (limited to 'testsuite/tests/simplCore/should_compile/T18995.hs')
-rw-r--r--testsuite/tests/simplCore/should_compile/T18995.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T18995.hs b/testsuite/tests/simplCore/should_compile/T18995.hs
new file mode 100644
index 0000000000..052a03ea98
--- /dev/null
+++ b/testsuite/tests/simplCore/should_compile/T18995.hs
@@ -0,0 +1,6 @@
+module T18995 where
+
+import GHC.Magic ( noinline )
+
+foo :: IO ()
+foo = (noinline print) True