[commit: ghc] ghc-8.6: Add -Wstar-is-type to the User's Guide (4ab2f34)

git at git.haskell.org git at git.haskell.org
Sat Oct 13 17:18:14 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-8.6
Link       : http://ghc.haskell.org/trac/ghc/changeset/4ab2f347b76d65a405959fb01a058a45e791c41b/ghc

>---------------------------------------------------------------

commit 4ab2f347b76d65a405959fb01a058a45e791c41b
Author: Vladislav Zavialov <vlad.z.4096 at gmail.com>
Date:   Thu Oct 4 13:43:47 2018 -0400

    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
    
    (cherry picked from commit 07083fc44ebf3f0510ae1d71ae5c9c88c87ae1d8)


>---------------------------------------------------------------

4ab2f347b76d65a405959fb01a058a45e791c41b
 docs/users_guide/using-warnings.rst | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst
index 2643f8f..d2a39df 100644
--- a/docs/users_guide/using-warnings.rst
+++ b/docs/users_guide/using-warnings.rst
@@ -34,6 +34,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:
@@ -1188,6 +1189,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`



More information about the ghc-commits mailing list