summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T1476b.hs
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2014-11-04 13:06:56 -0500
committerRichard Eisenberg <eir@cis.upenn.edu>2014-11-21 11:15:47 -0500
commitd627c5cf81fcce05ec160edc5be907297ff05c33 (patch)
tree0db971be5055a39c2afa511338863cf5e847c351 /testsuite/tests/th/T1476b.hs
parentadb20a0aec89047af397ef8c3fcde78217e6e5f6 (diff)
downloadhaskell-d627c5cf81fcce05ec160edc5be907297ff05c33.tar.gz
Test that nested pattern splices don't scope (#1476).
Test case: th/T1476b.
Diffstat (limited to 'testsuite/tests/th/T1476b.hs')
-rw-r--r--testsuite/tests/th/T1476b.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/th/T1476b.hs b/testsuite/tests/th/T1476b.hs
new file mode 100644
index 0000000000..918a3978dd
--- /dev/null
+++ b/testsuite/tests/th/T1476b.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE TemplateHaskell #-}
+
+module T1476b where
+
+import Language.Haskell.TH
+
+baz = [| \ $( return $ VarP $ mkName "x" ) -> x |]
+
+-- If this test starts passing, nested pattern splices scope correctly.
+-- Good for you! Now, update the TH manual accordingly.