Commit 14f9af49 authored by Ian Lynagh's avatar Ian Lynagh

Document GADTSyntax extension

parent 8415c28b
......@@ -762,6 +762,13 @@
<entry>dynamic</entry>
<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>
......
......@@ -2434,7 +2434,8 @@ declarations. Define your own instances!
<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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment