Split off -Wunused-type-variables from -Wunused-matches
authorRyanGlScott <ryan.gl.scott@gmail.com>
Tue, 26 Jan 2016 17:33:19 +0000 (12:33 -0500)
committerRyanGlScott <ryan.gl.scott@gmail.com>
Tue, 26 Jan 2016 17:33:33 +0000 (12:33 -0500)
commit6817703b31840620cca8596ca62ed70633934972
treea3141c8727e1a7e09b97183baa69c9cbcb666828
parent6d2bdfd8d40b926d7a11d003213220022a63d9f5
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
17 files changed:
compiler/hsSyn/PlaceHolder.hs
compiler/main/DynFlags.hs
compiler/rename/RnEnv.hs
compiler/rename/RnSource.hs
compiler/rename/RnTypes.hs
docs/users_guide/8.0.1-notes.rst
docs/users_guide/glasgow_exts.rst
docs/users_guide/using-warnings.rst
libraries/base/Data/Either.hs
libraries/base/Data/Type/Bool.hs
libraries/base/Data/Type/Equality.hs
libraries/base/GHC/Generics.hs
libraries/base/GHC/TypeLits.hs
testsuite/tests/determinism/should_compile/determ004.hs
testsuite/tests/indexed-types/should_compile/all.T
testsuite/tests/simplCore/should_compile/T10689a.hs
utils/mkUserGuidePart/Options/Warnings.hs