[commit: ghc] master: Wibbles to documentation for promoted lists and tuples (Trac #9882) (a3e6915)

git at git.haskell.org git at git.haskell.org
Mon Dec 15 17:39:52 UTC 2014


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

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

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

commit a3e6915431f93ebc0aaee22b7b9f118bffb01cae
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Dec 15 17:40:45 2014 +0000

    Wibbles to documentation for promoted lists and tuples (Trac #9882)


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

a3e6915431f93ebc0aaee22b7b9f118bffb01cae
 docs/users_guide/glasgow_exts.xml | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index 7edca07..a502262 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -6884,7 +6884,7 @@ is a single quote.</para>
 <sect2 id="promoted-lists-and-tuples">
 <title>Promoted list and tuple types</title>
 <para>
-With <option>-XTypeOperators</option>, Haskell's list and tuple types are natively promoted to kinds, and enjoy the
+With <option>-XDataKinds</option>, Haskell's list and tuple types are natively promoted to kinds, and enjoy the
 same convenient syntax at the type level, albeit prefixed with a quote:
 <programlisting>
 data HList :: [*] -> * where
@@ -6903,10 +6903,12 @@ foo1 = HCons (3::Int) HNil
 foo2 :: HList [Int, Bool]
 foo2 = ...
 </programlisting>
+(Note: the declaration for <literal>HCons</literal> also requires <option>-XTypeOperators</option>
+because of infix type operator <literal>(:')</literal>.)
 For type-level lists of <emphasis>two or more elements</emphasis>,
 such as the signature of <literal>foo2</literal> above, the quote may be omitted because the meaning is
-umambiguous. But for lists of one or zero elements (as in <literal>foo0</literal>
-and <literal>foo1</literal>), the quote is required, becuase the types <literal>[]</literal>
+unambiguous. But for lists of one or zero elements (as in <literal>foo0</literal>
+and <literal>foo1</literal>), the quote is required, because the types <literal>[]</literal>
 and <literal>[Int]</literal> have existing meanings in Haskell.
 </para>
 </sect2>



More information about the ghc-commits mailing list