[commit: ghc] master: Make -fsimple-list-literals a dynamic flag (30e7b73)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/30e7b73af1bc9ac7c34b020f84d11c50fadfcb2f

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

commit 30e7b73af1bc9ac7c34b020f84d11c50fadfcb2f
Author: Ian Lynagh <[email protected]>
Date:   Tue Oct 9 18:22:57 2012 +0100

    Make -fsimple-list-literals a dynamic flag

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

 compiler/deSugar/DsExpr.lhs       |    5 ++---
 compiler/main/DynFlags.hs         |    2 ++
 compiler/main/StaticFlagParser.hs |    1 -
 compiler/main/StaticFlags.hs      |    4 ----
 4 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/compiler/deSugar/DsExpr.lhs b/compiler/deSugar/DsExpr.lhs
index 88df581..c4ee50f 100644
--- a/compiler/deSugar/DsExpr.lhs
+++ b/compiler/deSugar/DsExpr.lhs
@@ -40,7 +40,6 @@ import CoreFVs
 import MkCore
 
 import DynFlags
-import StaticFlags
 import CostCentre
 import Id
 import VarSet
@@ -688,8 +687,8 @@ dsExplicitList elt_ty xs
   = do { dflags <- getDynFlags
        ; xs' <- mapM dsLExpr xs
        ; let (dynamic_prefix, static_suffix) = spanTail is_static xs'
-       ; if opt_SimpleListLiterals                      -- -fsimple-list-literals
-         || not (dopt Opt_EnableRewriteRules dflags)    -- Rewrite rules off
+       ; if dopt Opt_SimpleListLiterals dflags        -- -fsimple-list-literals
+         || not (dopt Opt_EnableRewriteRules dflags)  -- Rewrite rules off
                 -- Don't generate a build if there are no rules to eliminate it!
                 -- See Note [Desugaring RULE left hand sides] in Desugar
          || null dynamic_prefix   -- Avoid build (\c n. foldr c n xs)!
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 881d263..b23bab1 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -291,6 +291,7 @@ data DynFlag
    | Opt_CmmSink
    | Opt_CmmElimCommonBlocks
    | Opt_OmitYields
+   | Opt_SimpleListLiterals
 
    -- Interface files
    | Opt_IgnoreInterfacePragmas
@@ -2316,6 +2317,7 @@ fFlags = [
   ( "cmm-sink",                         Opt_CmmSink, nop ),
   ( "cmm-elim-common-blocks",           Opt_CmmElimCommonBlocks, nop ),
   ( "omit-yields",                      Opt_OmitYields, nop ),
+  ( "simple-list-literals",             Opt_SimpleListLiterals, nop ),
   ( "gen-manifest",                     Opt_GenManifest, nop ),
   ( "embed-manifest",                   Opt_EmbedManifest, nop ),
   ( "ext-core",                         Opt_EmitExternalCore, nop ),
diff --git a/compiler/main/StaticFlagParser.hs b/compiler/main/StaticFlagParser.hs
index 465f0d6..45d37c7 100644
--- a/compiler/main/StaticFlagParser.hs
+++ b/compiler/main/StaticFlagParser.hs
@@ -119,7 +119,6 @@ isStaticFlag f =
     "fno-hi-version-check",
     "dno-black-holing",
     "fno-state-hack",
-    "fsimple-list-literals",
     "fruntime-types",
     "fno-pre-inlining",
     "fno-opt-coercion",
diff --git a/compiler/main/StaticFlags.hs b/compiler/main/StaticFlags.hs
index 913241e..6330b2e 100644
--- a/compiler/main/StaticFlags.hs
+++ b/compiler/main/StaticFlags.hs
@@ -34,7 +34,6 @@ module StaticFlags (
 
 	-- optimisation opts
 	opt_NoStateHack,
-        opt_SimpleListLiterals,
 	opt_CprOff,
 	opt_SimplNoPreInlining,
 	opt_SimplExcessPrecision,
@@ -172,9 +171,6 @@ opt_NoDebugOutput               = lookUp  (fsLit "-dno-debug-output")
 opt_DictsStrict :: Bool
 opt_DictsStrict			= lookUp  (fsLit "-fdicts-strict")
 
-opt_SimpleListLiterals :: Bool
-opt_SimpleListLiterals	        = lookUp  (fsLit "-fsimple-list-literals")
-
 opt_NoStateHack :: Bool
 opt_NoStateHack			= lookUp  (fsLit "-fno-state-hack")
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.