diff options
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 |