summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorOleg Grenrus <oleg.grenrus@iki.fi>2021-03-21 01:52:07 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-03-25 17:36:50 -0400
commit0d5d344d45c200a5e731e7d067598acd2a4f7050 (patch)
tree462b5671404a9011e9609534739ca42ca5de5502 /docs
parentc74bd3daa3468e495714647506cf30cf650d390d (diff)
downloadhaskell-0d5d344d45c200a5e731e7d067598acd2a4f7050.tar.gz
Implement -Wmissing-kind-signatures
Fixes #19564
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/using-warnings.rst27
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