diff options
author | Richard Eisenberg <eir@cis.upenn.edu> | 2014-11-04 13:06:56 -0500 |
---|---|---|
committer | Richard Eisenberg <eir@cis.upenn.edu> | 2014-11-21 11:15:47 -0500 |
commit | d627c5cf81fcce05ec160edc5be907297ff05c33 (patch) | |
tree | 0db971be5055a39c2afa511338863cf5e847c351 /testsuite/tests/th/T1476b.hs | |
parent | adb20a0aec89047af397ef8c3fcde78217e6e5f6 (diff) | |
download | haskell-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.hs | 10 |
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. |