diff options
author | Vladislav Zavialov <vlad.z.4096@gmail.com> | 2018-10-04 13:43:47 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-10-04 22:27:54 -0400 |
commit | 07083fc44ebf3f0510ae1d71ae5c9c88c87ae1d8 (patch) | |
tree | dcd4c5560add59ebaea3d12e70e8402ce3099410 /docs | |
parent | 817ba0cf0d70663d934eee421288978ff939cbd2 (diff) | |
download | haskell-07083fc44ebf3f0510ae1d71ae5c9c88c87ae1d8.tar.gz |
Add -Wstar-is-type to the User's Guide
The -Wstar-is-type flag was added without documentation.
Now it has documentation.
Test Plan: Validate
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5203
Diffstat (limited to 'docs')
-rw-r--r-- | docs/users_guide/using-warnings.rst | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst index d93064b464..dba30dbf1e 100644 --- a/docs/users_guide/using-warnings.rst +++ b/docs/users_guide/using-warnings.rst @@ -37,6 +37,7 @@ generally likely to indicate bugs in your program. These are: * :ghc-flag:`-Wtabs` * :ghc-flag:`-Wunrecognised-warning-flags` * :ghc-flag:`-Winaccessible-code` + * :ghc-flag:`-Wstar-is-type` * :ghc-flag:`-Wstar-binder` The following flags are simple ways to select standard "packages" of warnings: @@ -1175,6 +1176,24 @@ of ``-W(no-)*``. since we're passing ``Foo1`` and ``Foo2`` here, it follows that ``t ~ Char``, and ``u ~ Int``, and thus ``t ~ u`` cannot hold. +.. ghc-flag:: -Wstar-is-type + :shortdesc: warn when ``*`` is used to mean ``Data.Kind.Type`` + :type: dynamic + :reverse: -Wno-star-is-type + :category: + + :since: 8.6 + + The use of ``*`` to denote the kind of inhabited types relies on the + :extension:`StarIsType` extension, which in a future release will be + turned off by default and then possibly removed. The reasons for this and + the deprecation schedule are described in `GHC proposal #30 + <https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0030-remove-star-kind.rst>`__. + + This warning allows to detect such uses of ``*`` before the actual + breaking change takes place. The recommended fix is to replace ``*`` with + ``Type`` imported from ``Data.Kind``. + .. ghc-flag:: -Wstar-binder :shortdesc: warn about binding the ``(*)`` type operator despite :ghc-flag:`-XStarIsType` |