[commit: ghc] master: Use a separate user's guide section for -XAutoDeriveTypeable (adbd30c)
José Pedro Magalhães
jpm at cs.uu.nl
Tue Feb 12 11:38:55 CET 2013
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/adbd30cd66e4a859ebe97464fd69a1d776ae4850
>---------------------------------------------------------------
commit adbd30cd66e4a859ebe97464fd69a1d776ae4850
Author: Jose Pedro Magalhaes <jpm at cs.ox.ac.uk>
Date: Tue Feb 12 10:37:22 2013 +0000
Use a separate user's guide section for -XAutoDeriveTypeable
>---------------------------------------------------------------
docs/users_guide/flags.xml | 2 +-
docs/users_guide/glasgow_exts.xml | 15 ++++++++++++---
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/docs/users_guide/flags.xml b/docs/users_guide/flags.xml
index bc583ac..f856f66 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 2a0917c..9dae355 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>
More information about the ghc-commits
mailing list