diff options
author | Richard Eisenberg <eir@cis.upenn.edu> | 2014-11-21 10:33:37 -0500 |
---|---|---|
committer | Richard Eisenberg <eir@cis.upenn.edu> | 2014-11-21 11:15:48 -0500 |
commit | bc05354949dce9d3b56353d3310eb9804d4e17f5 (patch) | |
tree | c32fa4799714f062ff9792e33ab31b0fd9622f2c /compiler/rename/RnPat.lhs | |
parent | 3b3944f9a1cf7d89dccf742d7449402cca31ba5a (diff) | |
download | haskell-bc05354949dce9d3b56353d3310eb9804d4e17f5.tar.gz |
Fix #9824 by not warning about unused matches in pattern quotes.
Diffstat (limited to 'compiler/rename/RnPat.lhs')
-rw-r--r-- | compiler/rename/RnPat.lhs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rename/RnPat.lhs b/compiler/rename/RnPat.lhs index 370f6b4cf7..d80b05e4b5 100644 --- a/compiler/rename/RnPat.lhs +++ b/compiler/rename/RnPat.lhs @@ -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) |