Commit 30e7b73a authored by ian@well-typed.com's avatar ian@well-typed.com

Make -fsimple-list-literals a dynamic flag

parent 1255ff1c
......@@ -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)!
......
......@@ -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 ),
......
......@@ -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",
......
......@@ -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")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment