Add test case for #16384
authorAlec Theriault <alec.theriault@gmail.com>
Wed, 17 Apr 2019 20:55:39 +0000 (13:55 -0700)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Fri, 19 Apr 2019 02:52:25 +0000 (22:52 -0400)
Now that `TExp` accepts unlifted types, #16384 is fixed. Since the real
issue there was GHC letting through an ill-kinded type which
`-dcore-lint` rightly rejected, a reasonable regression test is that
the program from #16384 can now be accepted without `-dcore-lint`
complaining.

testsuite/tests/quotes/T16384.hs [new file with mode: 0644]
testsuite/tests/quotes/all.T

diff --git a/testsuite/tests/quotes/T16384.hs b/testsuite/tests/quotes/T16384.hs
new file mode 100644 (file)
index 0000000..25d05d4
--- /dev/null
@@ -0,0 +1,9 @@
+{-# LANGUAGE MagicHash #-}
+{-# LANGUAGE TemplateHaskell #-}
+module T16384 where
+
+import GHC.Exts
+
+wat :: () -> Int#
+wat _ = $$([|| 1# ||])
+
index fa8bd4b..d5bdda0 100644 (file)
@@ -15,6 +15,7 @@ test('T8633', normal, compile_and_run, [''])
 test('T8759a', normal, compile, ['-v0'])
 test('T9824', normal, compile, ['-v0'])
 test('T10384', normal, compile_fail, [''])
+test('T16384', normal, compile, [''])
 
 test('TH_tf2', normal, compile, ['-v0'])
 test('TH_ppr1', normal, compile_and_run, [''])