Fix #9824 by not warning about unused matches in pattern quotes.
authorRichard Eisenberg <eir@cis.upenn.edu>
Fri, 21 Nov 2014 15:33:37 +0000 (10:33 -0500)
committerRichard Eisenberg <eir@cis.upenn.edu>
Fri, 21 Nov 2014 16:15:48 +0000 (11:15 -0500)
compiler/rename/RnPat.lhs
testsuite/tests/th/all.T

index 370f6b4..d80b05e 100644 (file)
@@ -203,6 +203,9 @@ matchNameMaker ctxt = LamMk report_unused
     -- i.e. when you type 'x <- e' at the GHCi prompt
     report_unused = case ctxt of
                       StmtCtxt GhciStmtCtxt -> False
+                      -- also, don't warn in pattern quotes, as there
+                      -- is no RHS where the variables can be used!
+                      ThPatQuote            -> False
                       _                     -> True
 
 rnHsSigCps :: HsWithBndrs RdrName (LHsType RdrName)
index e8b8cb6..60b6089 100644 (file)
@@ -346,4 +346,4 @@ test('T9209', normal, compile_fail, ['-v0'])
 test('T7484', normal, compile_fail, ['-v0'])
 test('T1476', normal, compile, ['-v0'])
 test('T1476b', normal, compile_fail, ['-v0'])
-test('T9824', expect_broken(9824), compile, ['-v0'])
+test('T9824', normal, compile, ['-v0'])