diff options
author | Oleg Grenrus <oleg.grenrus@iki.fi> | 2021-03-21 01:52:07 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2021-03-29 16:19:40 -0400 |
commit | 52bd5aa9e019395ee8a0be3cb92e95e80896a51b (patch) | |
tree | bde4c12f79f5a525109acbda35b86f3461c0d311 /docs/users_guide/using-warnings.rst | |
parent | d8c5576f49ef834f10b610e3ae954fa461d5fa1a (diff) | |
download | haskell-wip/ghc-9.2-merge.tar.gz |
Implement -Wmissing-kind-signatureswip/ghc-9.2-merge
Fixes #19564
(cherry picked from commit 0d5d344d45c200a5e731e7d067598acd2a4f7050)
Diffstat (limited to 'docs/users_guide/using-warnings.rst')
-rw-r--r-- | docs/users_guide/using-warnings.rst | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst index 9771837b93..4c1a01f6db 100644 --- a/docs/users_guide/using-warnings.rst +++ b/docs/users_guide/using-warnings.rst @@ -114,6 +114,7 @@ The following flags are simple ways to select standard "packages" of warnings: * :ghc-flag:`-Wunused-type-patterns` * :ghc-flag:`-Wsafe` * :ghc-flag:`-Wimplicit-lift` + * :ghc-flag:`-Wmissing-kind-signatures` .. ghc-flag:: -Weverything :shortdesc: enable all warnings supported by GHC @@ -1182,6 +1183,32 @@ of ``-W(no-)*``. synonyms must have a type signature. GHC also reports the inferred type. This option is off by default. +.. ghc-flag:: -Wmissing-kind-signatures + :shortdesc: warn when type declarations don't have kind signatures nor CUSKs + :type: dynamic + :reverse: -Wno-missing-kind-signatures + :category: + + :since: 9.2 + + .. index:: + single: kind signatures, missing + + If you would like GHC to check that every data, type family, + type-class definition has a :ref:`standalone kind signature <standalone-kind-signatures>` or a :ref:`CUSK <complete-kind-signatures>`, use the + :ghc-flag:`-Wmissing-kind-signatures` option. + You can specify the kind via :extension:`StandaloneKindSignatures` + or :extension:`CUSKs`. + + Note that :ghc-flag:`-Wmissing-kind-signatures` does not warn about + associated type families, as GHC considers an associated type family + declaration to have a CUSK if its enclosing class has a CUSK. (See + :ref:`complete-kind-signatures` for more on this point.) Therefore, giving + the parent class a standalone kind signature or CUSK is sufficient to fix + the warning for the class's associated type families as well. + + This option is off by default. + .. ghc-flag:: -Wname-shadowing :shortdesc: warn when names are shadowed :type: dynamic |