[project @ 2001-12-17 12:32:05 by simonmar]
[ghc-hetmet.git] / ghc / compiler / main / CmdLineOpts.lhs
index 3b99939..5cf3ce3 100644 (file)
@@ -8,7 +8,7 @@
 module CmdLineOpts (
        CoreToDo(..), StgToDo(..),
        SimplifierSwitch(..), 
-       SimplifierMode(..),
+       SimplifierMode(..), FloatOutSwitches(..),
 
        HscLang(..),
        DynFlag(..),    -- needed non-abstractly by DriverFlags
@@ -172,7 +172,7 @@ data CoreToDo               -- These are diff core-to-core passes,
                        -- Each run of the simplifier can take a different
                        -- set of simplifier-specific flags.
   | CoreDoFloatInwards
-  | CoreDoFloatOutwards Bool   -- True <=> float lambdas to top level
+  | CoreDoFloatOutwards FloatOutSwitches
   | CoreLiberateCase
   | CoreDoPrintCore
   | CoreDoStaticArgs
@@ -206,6 +206,11 @@ data SimplifierMode                -- See comments in SimplMonad
 data SimplifierSwitch
   = MaxSimplifierIterations Int
   | NoCaseOfCase
+
+data FloatOutSwitches
+  = FloatOutSw  Bool   -- True <=> float lambdas to top level
+               Bool    -- True <=> float constants to top level,
+                       --          even if they do not escape a lambda
 \end{code}
 
 %************************************************************************
@@ -293,12 +298,14 @@ data DynFlags = DynFlags {
   extCoreName          :: String,      -- name of the .core output file
   verbosity            :: Int,         -- verbosity level
   cppFlag              :: Bool,        -- preprocess with cpp?
+  ppFlag                :: Bool,        -- preprocess with a Haskell Pp?
   stolen_x86_regs      :: Int,         
   cmdlineHcIncludes    :: [String],    -- -#includes
 
   -- options for particular phases
   opt_L                        :: [String],
   opt_P                        :: [String],
+  opt_F                        :: [String],
   opt_c                        :: [String],
   opt_a                        :: [String],
   opt_m                        :: [String],
@@ -328,10 +335,12 @@ defaultDynFlags = DynFlags {
   extCoreName = "",
   verbosity = 0, 
   cppFlag              = False,
+  ppFlag                = False,
   stolen_x86_regs      = 4,
   cmdlineHcIncludes    = [],
   opt_L                        = [],
   opt_P                        = [],
+  opt_F                 = [],
   opt_c                        = [],
   opt_a                        = [],
   opt_m                        = [],