[commit: ghc] master: Split off -Wunused-type-variables from -Wunused-matches (6817703)
git at git.haskell.org
git at git.haskell.org
Tue Jan 26 17:37:38 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/6817703b31840620cca8596ca62ed70633934972/ghc
>---------------------------------------------------------------
commit 6817703b31840620cca8596ca62ed70633934972
Author: RyanGlScott <ryan.gl.scott at gmail.com>
Date: Tue Jan 26 12:33:19 2016 -0500
Split off -Wunused-type-variables from -Wunused-matches
Summary:
Previously, `-Wunused-matches` would fire whenever it detected unused type
variables in a type family or data family instance. This can be annoying for
users who wish to use type variable names as documentation, as being
`-Wall`-compliant would mean that they'd have to prefix many of their type
variable names with underscores, making the documentation harder to read.
To avoid this, a new warning `-Wunused-type-variables` was created that only
encompasses unused variables in family instances. `-Wunused-matches` reverts
back to its role of only warning on unused term-level pattern names. Unlike
`-Wunused-matches`, `-Wunused-type-variables` is not implied by `-Wall`.
Fixes #11451.
Test Plan: ./validate
Reviewers: goldfire, ekmett, austin, hvr, simonpj, bgamari
Reviewed By: simonpj, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1825
GHC Trac Issues: #11451
>---------------------------------------------------------------
6817703b31840620cca8596ca62ed70633934972
compiler/hsSyn/PlaceHolder.hs | 12 +++---
compiler/main/DynFlags.hs | 5 +++
compiler/rename/RnEnv.hs | 10 +++--
compiler/rename/RnSource.hs | 6 +--
compiler/rename/RnTypes.hs | 2 +-
docs/users_guide/8.0.1-notes.rst | 18 +++++++--
docs/users_guide/glasgow_exts.rst | 28 ++++++++-----
docs/users_guide/using-warnings.rst | 46 ++++++++++++++++++++--
libraries/base/Data/Either.hs | 2 +-
libraries/base/Data/Type/Bool.hs | 12 +++---
libraries/base/Data/Type/Equality.hs | 16 ++++----
libraries/base/GHC/Generics.hs | 28 ++++++-------
libraries/base/GHC/TypeLits.hs | 8 ++--
.../tests/determinism/should_compile/determ004.hs | 6 +--
testsuite/tests/indexed-types/should_compile/all.T | 4 +-
.../tests/simplCore/should_compile/T10689a.hs | 4 +-
utils/mkUserGuidePart/Options/Warnings.hs | 12 ++++++
17 files changed, 149 insertions(+), 70 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 6817703b31840620cca8596ca62ed70633934972
More information about the ghc-commits
mailing list