summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Theriault <alec.theriault@gmail.com>2019-04-17 13:55:39 -0700
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-04-18 22:52:25 -0400
commitfdfd97310128d82ac5316d357f0422c9939c1edc (patch)
tree9d56ff314b9be4e06f0dcb78e4f91505cff910ea
parent57cf113302eee6068a1b10cba348f4b7de7faeae (diff)
downloadhaskell-fdfd97310128d82ac5316d357f0422c9939c1edc.tar.gz
Add test case for #16384
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.
-rw-r--r--testsuite/tests/quotes/T16384.hs9
-rw-r--r--testsuite/tests/quotes/all.T1
2 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/quotes/T16384.hs b/testsuite/tests/quotes/T16384.hs
new file mode 100644
index 0000000000..25d05d4d38
--- /dev/null
+++ b/testsuite/tests/quotes/T16384.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE MagicHash #-}
+{-# LANGUAGE TemplateHaskell #-}
+module T16384 where
+
+import GHC.Exts
+
+wat :: () -> Int#
+wat _ = $$([|| 1# ||])
+
diff --git a/testsuite/tests/quotes/all.T b/testsuite/tests/quotes/all.T
index fa8bd4b634..d5bdda0124 100644
--- a/testsuite/tests/quotes/all.T
+++ b/testsuite/tests/quotes/all.T
@@ -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, [''])