Implement -Wredundant-record-wildcards and -Wunused-record-wildcards
authorMatthew Pickering <matthewtpickering@gmail.com>
Mon, 11 Feb 2019 09:24:04 +0000 (09:24 +0000)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Thu, 14 Feb 2019 07:36:02 +0000 (02:36 -0500)
commit19626218566ea709b5f6f287d3c296b0c4021de2
treed22f486e543a19670be2ae88e8e358f99e1e54fd
parent1d9a1d9fb8fe0a1fea2c44c4246f102ff3e1f3a3
Implement -Wredundant-record-wildcards and -Wunused-record-wildcards

-Wredundant-record-wildcards warns when a .. pattern binds no variables.

-Wunused-record-wildcards warns when none of the variables bound by a ..
pattern are used.

These flags are enabled by `-Wall`.
23 files changed:
compiler/hsSyn/HsPat.hs
compiler/hsSyn/HsUtils.hs
compiler/main/DynFlags.hs
compiler/parser/Parser.y
compiler/parser/RdrHsSyn.hs
compiler/rename/RnBinds.hs
compiler/rename/RnExpr.hs
compiler/rename/RnPat.hs
compiler/rename/RnUtils.hs
compiler/typecheck/TcTypeable.hs
docs/users_guide/8.10.1-notes.rst [new file with mode: 0644]
docs/users_guide/using-warnings.rst
libraries/base/GHC/IO/Handle.hs
libraries/ghc-heap/GHC/Exts/Heap/Closures.hs
libraries/ghci/GHCi/TH.hs
libraries/libiserv/src/Lib.hs
testsuite/tests/rename/should_compile/T15957.hs [new file with mode: 0644]
testsuite/tests/rename/should_compile/all.T
testsuite/tests/rename/should_fail/T15957_Fail.hs [new file with mode: 0644]
testsuite/tests/rename/should_fail/T15957_Fail.stderr [new file with mode: 0644]
testsuite/tests/rename/should_fail/T9437.stderr
testsuite/tests/rename/should_fail/all.T
testsuite/tests/typecheck/should_compile/T4404.hs