[project @ 2005-02-07 12:16:50 by simonpj]
authorsimonpj <unknown>
Mon, 7 Feb 2005 12:16:52 +0000 (12:16 +0000)
committersimonpj <unknown>
Mon, 7 Feb 2005 12:16:52 +0000 (12:16 +0000)
-----------------------------------------------------
Switch off derivable type class generation by default
-----------------------------------------------------

Merge to STABLE

This commit switches off the generation of the support code for 'Derivable
Type Classes' by default.  Use -fgenerics to switch it on.

Motivation: seldom used, and there's a nasty blowup in Core types for data
types that have lots of constructors or lots of fields.

We now put -fgenerics in the GhcLibOpts, so that the libraries have the
support code, as before.

ghc/compiler/main/CmdLineOpts.lhs
mk/config.mk.in

index c1f8880..cf7fd7f 100644 (file)
@@ -388,9 +388,6 @@ defaultDynFlags = DynFlags {
   flags = [ 
            Opt_ImplicitPrelude,
            Opt_MonomorphismRestriction,
-           Opt_Generics,
-                       -- Generating the helper-functions for
-                       -- generics is now on by default
            Opt_Strictness,
                        -- strictness is on by default, but this only
                        -- applies to -O.
index 1a8dc38..af7dbe9 100644 (file)
@@ -319,8 +319,13 @@ endif
 #
 #      -O is pretty desirable, otherwise no inlining of prelude
 #              things (incl "+") happens when compiling with this compiler
+#
+#      -fgenerics switches on generation of support code for 
+#              derivable type classes.  This is now off by default,
+#              but we switch it on for the libraries so that we generate
+#              the code in case someone importing wants it
 
-GhcLibHcOpts=-O -Rghc-timing
+GhcLibHcOpts=-O -Rghc-timing -fgenerics
 
 # Win32 only: Enable the RTS and libraries to be built as DLLs
 DLLized=@EnableWin32DLLs@