Document GADTSyntax extension
authorIan Lynagh <igloo@earth.li>
Sat, 18 Dec 2010 15:01:21 +0000 (15:01 +0000)
committerIan Lynagh <igloo@earth.li>
Sat, 18 Dec 2010 15:01:21 +0000 (15:01 +0000)
docs/users_guide/flags.xml
docs/users_guide/glasgow_exts.xml

index 2bcb5e6..a9c0184 100644 (file)
              <entry><option>-XNoGADTs</option></entry>
            </row>
            <row>
              <entry><option>-XNoGADTs</option></entry>
            </row>
            <row>
+             <entry><option>-XGADTSyntax</option></entry>
+             <entry>Enable <link linkend="gadt-style">generalised algebraic data type syntax</link>.
+             </entry>
+             <entry>dynamic</entry>
+             <entry><option>-XNoGADTSyntax</option></entry>
+           </row>
+           <row>
              <entry><option>-XTypeFamilies</option></entry>
              <entry>Enable <link linkend="type-families">type families</link>.</entry>
              <entry>dynamic</entry>
              <entry><option>-XTypeFamilies</option></entry>
              <entry>Enable <link linkend="type-families">type families</link>.</entry>
              <entry>dynamic</entry>
index a193088..ddbd2ec 100644 (file)
@@ -2434,7 +2434,8 @@ declarations.  Define your own instances!
 <sect2 id="gadt-style">
 <title>Declaring data types with explicit constructor signatures</title>
 
 <sect2 id="gadt-style">
 <title>Declaring data types with explicit constructor signatures</title>
 
-<para>GHC allows you to declare an algebraic data type by 
+<para>When the <literal>GADTSyntax</literal> extension is enabled,
+GHC allows you to declare an algebraic data type by
 giving the type signatures of constructors explicitly.  For example:
 <programlisting>
   data Maybe a where
 giving the type signatures of constructors explicitly.  For example:
 <programlisting>
   data Maybe a where