summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2015-05-04 17:28:11 -0700
committerEdward Z. Yang <ezyang@cs.stanford.edu>2015-05-09 01:26:06 -0700
commiteb0ed4030374af542c0a459480d32c8d4525e48d (patch)
tree52a5f42fcfd8bc4c4ebb6f5c88038abdaa5f9b75 /testsuite
parent21c72e7d38c96ac80d31addf67ae4b3c7a6c3bbb (diff)
downloadhaskell-eb0ed4030374af542c0a459480d32c8d4525e48d.tar.gz
RnSplice's staging test should be applied for quotes in stage1.
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/D878 GHC Trac Issues: #10382
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/quotes/TH_localname.hs3
-rw-r--r--testsuite/tests/quotes/TH_localname.stderr22
-rw-r--r--testsuite/tests/quotes/all.T1
3 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/tests/quotes/TH_localname.hs b/testsuite/tests/quotes/TH_localname.hs
new file mode 100644
index 0000000000..5bc0e96036
--- /dev/null
+++ b/testsuite/tests/quotes/TH_localname.hs
@@ -0,0 +1,3 @@
+module TH_localname where
+
+x = \y -> [| y |]
diff --git a/testsuite/tests/quotes/TH_localname.stderr b/testsuite/tests/quotes/TH_localname.stderr
new file mode 100644
index 0000000000..a83c606eb4
--- /dev/null
+++ b/testsuite/tests/quotes/TH_localname.stderr
@@ -0,0 +1,22 @@
+
+TH_localname.hs:3:11: error:
+ No instance for (Lift t0) arising from a use of ‘lift’
+ The type variable ‘t0’ is ambiguous
+ Relevant bindings include
+ y :: t0 (bound at TH_localname.hs:3:6)
+ x :: t0 -> ExpQ (bound at TH_localname.hs:3:1)
+ Note: there are several potential instances:
+ instance (Lift a, Lift b) => Lift (Either a b)
+ -- Defined in ‘Language.Haskell.TH.Syntax’
+ instance Lift a => Lift (Maybe a)
+ -- Defined in ‘Language.Haskell.TH.Syntax’
+ instance Lift Int16 -- Defined in ‘Language.Haskell.TH.Syntax’
+ ...plus 24 others
+ In the expression: lift y
+ In the expression:
+ [| y |]
+ pending(rn) [<y, lift y>]
+ In the expression:
+ \ y
+ -> [| y |]
+ pending(rn) [<y, lift y>]
diff --git a/testsuite/tests/quotes/all.T b/testsuite/tests/quotes/all.T
index 2688391f15..a3dfb8bccf 100644
--- a/testsuite/tests/quotes/all.T
+++ b/testsuite/tests/quotes/all.T
@@ -27,3 +27,4 @@ test('TH_reifyType2', normal, compile, [''])
test('TH_repE1', normal, compile, [''])
test('TH_repE3', normal, compile, [''])
test('TH_abstractFamily', normal, compile_fail, [''])
+test('TH_localname', normal, compile_fail, [''])