diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml index 96685bc059a6f81433c8b8a73a9c763d27dbaa6c..2c4cd0ca6c5d605744fb0a825bc086af6b6142dc 100644 --- a/docs/users_guide/glasgow_exts.xml +++ b/docs/users_guide/glasgow_exts.xml @@ -5152,10 +5152,12 @@ is not what we intend when defining length-indexed vectors. </para> <para> -With the <option>-XPolyKinds</option> flag, users can specify better kinds for -their programs. This flag enables two orthogonal but related features: kind -polymorphism and user defined kinds through datatype promotion. With -<option>-XPolyKinds</option>, the example above can then be rewritten to: +With the flags <option>-XPolyKinds</option> and <option>-XDataKinds</option>, +users get access to a richer kind language. +<option>-XPolyKinds</option> enables kind polymorphism, while +<option>-XDataKinds</option> enables user defined kinds through datatype +promotion. With <option>-XDataKinds</option>, the example above can then be +rewritten to: <programlisting> data Nat = Ze | Su Nat @@ -5193,7 +5195,8 @@ class Typeable2 (t :: * -> * -> *) where </para> <para> -Kind polymorphism allows us to merge all these classes into one: +Kind polymorphism (with <option>-XPolyKinds</option>) +allows us to merge all these classes into one: <programlisting> data Proxy t = Proxy @@ -5212,8 +5215,8 @@ Note that the datatype <literal>Proxy</literal> has kind <para> There are some restrictions in the current implementation: <itemizedlist> - <listitem><para>You cannot explicitly abstract over kinds, or mention kind - variables. So the following are all rejected: + <listitem><para>You cannot (yet) explicitly abstract over kinds, or mention + kind variables. So the following are all rejected: <programlisting> data D1 (t :: k) @@ -5237,8 +5240,7 @@ type instance F Int = Maybe <sect2 id="promotion"> <title>Datatype promotion</title> <para> -Along with kind polymorphism comes the ability to define custom named kinds. -With <option>-XPolyKinds</option>, GHC automatically promotes every suitable +With <option>-XDataKinds</option>, GHC automatically promotes every suitable datatype to be a kind, and its (value) constructors to be type constructors. The following types <programlisting>