diff options
author | RyanGlScott <ryan.gl.scott@gmail.com> | 2016-01-26 12:33:19 -0500 |
---|---|---|
committer | RyanGlScott <ryan.gl.scott@gmail.com> | 2016-01-26 12:33:33 -0500 |
commit | 6817703b31840620cca8596ca62ed70633934972 (patch) | |
tree | a3141c8727e1a7e09b97183baa69c9cbcb666828 /compiler/hsSyn | |
parent | 6d2bdfd8d40b926d7a11d003213220022a63d9f5 (diff) | |
download | haskell-6817703b31840620cca8596ca62ed70633934972.tar.gz |
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
Diffstat (limited to 'compiler/hsSyn')
-rw-r--r-- | compiler/hsSyn/PlaceHolder.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/hsSyn/PlaceHolder.hs b/compiler/hsSyn/PlaceHolder.hs index 004f465d76..87736ac3d0 100644 --- a/compiler/hsSyn/PlaceHolder.hs +++ b/compiler/hsSyn/PlaceHolder.hs @@ -37,15 +37,15 @@ data PlaceHolder = PlaceHolder -- | Types that are not defined until after type checking type family PostTc it ty :: * -- Note [Pass sensitive types] -type instance PostTc Id ty = ty -type instance PostTc Name _ty = PlaceHolder -type instance PostTc RdrName _ty = PlaceHolder +type instance PostTc Id ty = ty +type instance PostTc Name ty = PlaceHolder +type instance PostTc RdrName ty = PlaceHolder -- | Types that are not defined until after renaming type family PostRn id ty :: * -- Note [Pass sensitive types] -type instance PostRn Id ty = ty -type instance PostRn Name ty = ty -type instance PostRn RdrName _ty = PlaceHolder +type instance PostRn Id ty = ty +type instance PostRn Name ty = ty +type instance PostRn RdrName ty = PlaceHolder placeHolderKind :: PlaceHolder placeHolderKind = PlaceHolder |