Commit d627c5cf authored by's avatar

Test that nested pattern splices don't scope (#1476).

Test case: th/T1476b.
parent adb20a0a
{-# 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.
Not in scope: ‘x’
In the Template Haskell quotation
[| \ $(return $ VarP $ mkName "x") -> x |]
......@@ -345,3 +345,4 @@ test('T9064', normal, compile, ['-v0'])
test('T9209', normal, compile_fail, ['-v0'])
test('T7484', normal, compile_fail, ['-v0'])
test('T1476', expect_broken(1476), compile, ['-v0'])
test('T1476b', normal, compile_fail, ['-v0'])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment