Make -fsimple-list-literals a dynamic flag
authorIan Lynagh <ian@well-typed.com>
Tue, 9 Oct 2012 17:22:57 +0000 (18:22 +0100)
committerIan Lynagh <ian@well-typed.com>
Tue, 9 Oct 2012 17:30:10 +0000 (18:30 +0100)
compiler/deSugar/DsExpr.lhs
compiler/main/DynFlags.hs
compiler/main/StaticFlagParser.hs
compiler/main/StaticFlags.hs

index 88df581..c4ee50f 100644 (file)
@@ -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)!
index 881d263..b23bab1 100644 (file)
@@ -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 ),
index 465f0d6..45d37c7 100644 (file)
@@ -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",
index 913241e..6330b2e 100644 (file)
@@ -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")