summaryrefslogtreecommitdiff
path: root/testsuite/tests/quotes
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/quotes')
-rw-r--r--testsuite/tests/quotes/T10384.hs3
-rw-r--r--testsuite/tests/quotes/T10384.stderr6
-rw-r--r--testsuite/tests/quotes/all.T1
3 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/quotes/T10384.hs b/testsuite/tests/quotes/T10384.hs
new file mode 100644
index 0000000000..773deb061a
--- /dev/null
+++ b/testsuite/tests/quotes/T10384.hs
@@ -0,0 +1,3 @@
+{-# LANGUAGE TemplateHaskell, RankNTypes, ScopedTypeVariables #-}
+module A where
+x = \(y :: forall a. a -> a) -> [|| y ||]
diff --git a/testsuite/tests/quotes/T10384.stderr b/testsuite/tests/quotes/T10384.stderr
new file mode 100644
index 0000000000..f2360fd5ba
--- /dev/null
+++ b/testsuite/tests/quotes/T10384.stderr
@@ -0,0 +1,6 @@
+
+T10384.hs:3:37: error:
+ Can't splice the polymorphic local variable ‘y’
+ In the Template Haskell quotation [|| y ||]
+ In the expression: [|| y ||]
+ In the expression: \ (y :: forall a. a -> a) -> [|| y ||]
diff --git a/testsuite/tests/quotes/all.T b/testsuite/tests/quotes/all.T
index a3dfb8bccf..a56a50c010 100644
--- a/testsuite/tests/quotes/all.T
+++ b/testsuite/tests/quotes/all.T
@@ -15,6 +15,7 @@ test('T8455', normal, compile, ['-v0'])
test('T8633', normal, compile_and_run, [''])
test('T8759a', normal, compile_fail, ['-v0'])
test('T9824', normal, compile, ['-v0'])
+test('T10384', normal, compile_fail, [''])
test('TH_tf2', normal, compile, ['-v0'])
test('TH_ppr1', normal, compile_and_run, [''])