[commit: ghc] master: Make AutoDeriveTypeable imply DeriveDataTypeable (a684a55)

José Pedro Magalhães jpm at cs.uu.nl
Fri Mar 8 11:44:07 CET 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/a684a5518f7bb6cf5ecaa72d28ba6d976c87e230

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

commit a684a5518f7bb6cf5ecaa72d28ba6d976c87e230
Author: Jose Pedro Magalhaes <jpm at cs.ox.ac.uk>
Date:   Fri Mar 8 08:04:37 2013 +0000

    Make AutoDeriveTypeable imply DeriveDataTypeable

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

 compiler/main/DynFlags.hs         | 3 +++
 docs/users_guide/flags.xml        | 3 ++-
 docs/users_guide/glasgow_exts.xml | 3 ++-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 479516d..b179420 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -2728,6 +2728,9 @@ impliedFlags
     , (Opt_TypeFamilies,     turnOn, Opt_KindSignatures)  -- Type families use kind signatures
     , (Opt_PolyKinds,        turnOn, Opt_KindSignatures)  -- Ditto polymorphic kinds
 
+    -- AutoDeriveTypeable is not very useful without DeriveDataTypeable
+    , (Opt_AutoDeriveTypeable, turnOn, Opt_DeriveDataTypeable)
+
     -- We turn this on so that we can export associated type
     -- type synonyms in subordinates (e.g. MyClass(type AssocType))
     , (Opt_TypeFamilies,     turnOn, Opt_ExplicitNamespaces)
diff --git a/docs/users_guide/flags.xml b/docs/users_guide/flags.xml
index 299b4d5..f5f51b0 100644
--- a/docs/users_guide/flags.xml
+++ b/docs/users_guide/flags.xml
@@ -1069,7 +1069,8 @@
           </row>
           <row>
             <entry><option>-XAutoDeriveTypeable</option></entry>
-            <entry>Automatically <link linkend="auto-derive-typeable">derive Typeable instances for every datatype and type class declaration</link>.</entry>
+            <entry>Automatically <link linkend="auto-derive-typeable">derive Typeable instances for every datatype and type class declaration</link>.
+            Implies <option>-XDeriveDataTypeable</option>.</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 03682bf..16d180a 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -3434,7 +3434,8 @@ can be mentioned in the <literal>deriving</literal> clause.
 <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.
+class declaration in the module it is used. This flag implies
+<option>-XDeriveDataTypeable</option> (<xref linkend="deriving-typeable"/>).
 </para>
 
 </sect2>





More information about the ghc-commits mailing list