diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-05-05 10:53:00 -0700 |
---|---|---|
committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-05-09 01:26:06 -0700 |
commit | 9a43b2c1f78b3cf684646af64b9b67dc8079f58f (patch) | |
tree | ed751564c89577c2733a1055a979381cf407ead9 /testsuite/tests/quotes | |
parent | eb0ed4030374af542c0a459480d32c8d4525e48d (diff) | |
download | haskell-9a43b2c1f78b3cf684646af64b9b67dc8079f58f.tar.gz |
Always do polymorphic typed quote check, c.f. #10384
Summary:
Since quotes are enabled in stage1, we need to do the
staging check. This also "fixes" #10384 by adding
a test for the polymorphic local variable test.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, austin
Subscribers: bgamari, thomie
Differential Revision: https://phabricator.haskell.org/D880
GHC Trac Issues: #10384
Diffstat (limited to 'testsuite/tests/quotes')
-rw-r--r-- | testsuite/tests/quotes/T10384.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/quotes/T10384.stderr | 6 | ||||
-rw-r--r-- | testsuite/tests/quotes/all.T | 1 |
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, ['']) |