[commit: ghc] wip/wildcards-warn: Implement -Wredundant-record-wildcards and -Wunused-record-wildcards (db47e63)
git at git.haskell.org
git at git.haskell.org
Tue Feb 12 07:01:06 UTC 2019
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/wildcards-warn
Link : http://ghc.haskell.org/trac/ghc/changeset/db47e6320b585adb5100c773105c9e861eebab21/ghc
>---------------------------------------------------------------
commit db47e6320b585adb5100c773105c9e861eebab21
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date: Mon Feb 11 09:24:04 2019 +0000
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 not enabled by `-Wall` currently. If people think it
is appropuiate to add them then that is an easy change.
>---------------------------------------------------------------
db47e6320b585adb5100c773105c9e861eebab21
compiler/main/DynFlags.hs | 4 +
compiler/rename/RnExpr.hs | 2 +-
compiler/rename/RnPat.hs | 113 ++++++++++++++++-----
compiler/rename/RnUtils.hs | 15 +++
docs/users_guide/using-warnings.rst | 42 ++++++++
testsuite/tests/rename/should_compile/T15957.hs | 8 ++
testsuite/tests/rename/should_compile/all.T | 1 +
testsuite/tests/rename/should_fail/T15957_Fail.hs | 11 ++
.../tests/rename/should_fail/T15957_Fail.stderr | 9 ++
testsuite/tests/rename/should_fail/all.T | 1 +
10 files changed, 182 insertions(+), 24 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc db47e6320b585adb5100c773105c9e861eebab21
More information about the ghc-commits
mailing list