summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJose Pedro Magalhaes <jpm@cs.ox.ac.uk>2013-02-12 10:37:22 +0000
committerJose Pedro Magalhaes <jpm@cs.ox.ac.uk>2013-02-12 10:37:22 +0000
commitadbd30cd66e4a859ebe97464fd69a1d776ae4850 (patch)
tree4f8d143e91be43903fe2a9a65d28afb26fa3e614 /docs
parent72b0ba09542400843a79f2e00a933ed6ea39698b (diff)
downloadhaskell-adbd30cd66e4a859ebe97464fd69a1d776ae4850.tar.gz
Use a separate user's guide section for -XAutoDeriveTypeable
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/flags.xml2
-rw-r--r--docs/users_guide/glasgow_exts.xml15
2 files changed, 13 insertions, 4 deletions
diff --git a/docs/users_guide/flags.xml b/docs/users_guide/flags.xml
index bc583acabc..f856f66dcf 100644
--- a/docs/users_guide/flags.xml
+++ b/docs/users_guide/flags.xml
@@ -1062,7 +1062,7 @@
</row>
<row>
<entry><option>-XAutoDeriveTypeable</option></entry>
- <entry>Automatically derive Typeable instances for every datatype and type class declaration.</entry>
+ <entry>Automatically <link linkend="auto-derive-typeable">derive Typeable instances for every datatype and type class declaration</link>.</entry>
<entry>dynamic</entry>
<entry><option>-XNoAutoDeriveTypeable</option></entry>
</row>
diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index 2a0917c039..9dae3553b1 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -3385,9 +3385,7 @@ type class. Instances for datatypes can be derived by attaching a
<literal>deriving Typeable</literal> clause to the datatype declaration, or by
using standalone deriving (see <xref linkend="stand-alone-deriving"/>).
Instances for type classes can only be derived using standalone deriving.
-Additionally, <option>-XAutoDeriveTypeable</option> will trigger the generation
-of derived <literal>Typeable</literal> instances for every datatype and type
-class declaration in the module it is used.
+See also <xref linkend="auto-derive-typeable"/>.
</para>
<para>
Also since GHC 7.8.1, handwritten (ie. not derived) instances of
@@ -3422,6 +3420,17 @@ can be mentioned in the <literal>deriving</literal> clause.
</para>
</sect2>
+<sect2 id="auto-derive-typeable">
+<title>Automatically deriving <literal>Typeable</literal> instances</title>
+
+<para>
+The flag <option>-XAutoDeriveTypeable</option> triggers the generation
+of derived <literal>Typeable</literal> instances for every datatype and type
+class declaration in the module it is used.
+</para>
+
+</sect2>
+
<sect2 id="newtype-deriving">
<title>Generalised derived instances for newtypes</title>