[commit: ghc] master: users-guide: Mention changes necessary due to #13391 (bbb8cb9)

git at git.haskell.org git at git.haskell.org
Tue Sep 19 22:54:37 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/bbb8cb92b66d83bb7d472e7905c84c28cbb0997c/ghc

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

commit bbb8cb92b66d83bb7d472e7905c84c28cbb0997c
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Tue Sep 19 16:57:08 2017 -0400

    users-guide: Mention changes necessary due to #13391
    
    Some variant of this should also be added to the migration guide.
    
    [skip ci]
    
    Test Plan: Read it
    
    Reviewers: goldfire, austin
    
    Reviewed By: goldfire
    
    Subscribers: rwbarton, thomie
    
    GHC Trac Issues: #13391
    
    Differential Revision: https://phabricator.haskell.org/D3966


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

bbb8cb92b66d83bb7d472e7905c84c28cbb0997c
 docs/users_guide/8.4.1-notes.rst | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/docs/users_guide/8.4.1-notes.rst b/docs/users_guide/8.4.1-notes.rst
index 2d03190..9a1235f 100644
--- a/docs/users_guide/8.4.1-notes.rst
+++ b/docs/users_guide/8.4.1-notes.rst
@@ -59,6 +59,24 @@ Language
       data StrictJust a <- Just !a where
         StrictJust !a = Just a
 
+- GADTs with kind-polymorphic type arguments now require :ghc-flag:`TypeInType`.
+  For instance, consider the following, ::
+
+      data G :: k -> * where
+        GInt   :: G Int
+        GMaybe :: G Maybe
+
+  In previous releases this would compile with :ghc-flag:`PolyKinds` alone due
+  to bug :ghc-ticket:`13391`. As of GHC 8.4, however, this requires
+  :ghc-flag:`TypeInType`. Note that since GADT kind signatures aren't generalized,
+  this will also require that you provide a :ref:`CUSK
+  <complete-kind-signatures>` by explicitly quantifying over the kind argument,
+  ``k``, ::
+
+      data G :: forall k. k -> * where
+        GInt   :: G Int
+        GMaybe :: G Maybe
+
 Compiler
 ~~~~~~~~
 



More information about the ghc-commits mailing list