From: simonpj Date: Mon, 7 Feb 2005 12:16:52 +0000 (+0000) Subject: [project @ 2005-02-07 12:16:50 by simonpj] X-Git-Tag: Initial_conversion_from_CVS_complete~1103 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=3ab57e452b212ca2cf361841b24d67aae1860b47 [project @ 2005-02-07 12:16:50 by simonpj] ----------------------------------------------------- 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. --- diff --git a/ghc/compiler/main/CmdLineOpts.lhs b/ghc/compiler/main/CmdLineOpts.lhs index c1f8880..cf7fd7f 100644 --- a/ghc/compiler/main/CmdLineOpts.lhs +++ b/ghc/compiler/main/CmdLineOpts.lhs @@ -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. diff --git a/mk/config.mk.in b/mk/config.mk.in index 1a8dc38..af7dbe9 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -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@