-----------------------------------------------------------------------------
--- $Id: DriverState.hs,v 1.59 2001/10/01 14:28:37 rrt Exp $
+-- $Id: DriverState.hs,v 1.63 2001/12/10 14:08:14 simonmar Exp $
--
-- Settings for the driver
--
GLOBAL_VAR(v_GhcMode, error "mode not set", GhcMode)
+isCompManagerMode DoMake = True
+isCompManagerMode DoInteractive = True
+isCompManagerMode _ = False
+
-----------------------------------------------------------------------------
-- Global compilation flags
]
{-# NOINLINE v_Hs_source_cpp_opts #-}
+
-- Keep output from intermediate phases
GLOBAL_VAR(v_Keep_hi_diffs, False, Bool)
GLOBAL_VAR(v_Keep_hc_files, False, Bool)
-GLOBAL_VAR(v_Keep_il_files, False, Bool)
GLOBAL_VAR(v_Keep_s_files, False, Bool)
GLOBAL_VAR(v_Keep_raw_s_files, False, Bool)
GLOBAL_VAR(v_Keep_tmp_files, False, Bool)
+#ifdef ILX
+GLOBAL_VAR(v_Keep_il_files, False, Bool)
+GLOBAL_VAR(v_Keep_ilx_files, False, Bool)
+#endif
-- Misc
GLOBAL_VAR(v_Scale_sizes_by, 1.0, Double)
GLOBAL_VAR(v_Excess_precision, False, Bool)
GLOBAL_VAR(v_Read_DotGHCi, True, Bool)
+-- Preprocessor flags
+GLOBAL_VAR(v_Hs_source_pp_opts, [], [String])
+
-----------------------------------------------------------------------------
-- Splitting object files (for libraries)
GLOBAL_VAR(v_StgStats, False, Bool)
GLOBAL_VAR(v_UsageSPInf, False, Bool) -- Off by default
GLOBAL_VAR(v_Strictness, True, Bool)
+#ifdef DEBUG
GLOBAL_VAR(v_CPR, True, Bool)
+#endif
GLOBAL_VAR(v_CSE, True, Bool)
GLOBAL_VAR(v_RuleCheck, Nothing, Maybe String)
max_iter <- readIORef v_MaxSimplifierIterations
usageSP <- readIORef v_UsageSPInf
strictness <- readIORef v_Strictness
+#ifdef DEBUG
cpr <- readIORef v_CPR
+#endif
cse <- readIORef v_CSE
rule_check <- readIORef v_RuleCheck
],
case rule_check of { Just pat -> CoreDoRuleCheck 0 pat; Nothing -> CoreDoNothing },
+#ifdef DEBUG
if cpr then CoreDoCPResult else CoreDoNothing,
+#endif
if strictness then CoreDoStrictness else CoreDoNothing,
CoreDoWorkerWrapper,
CoreDoGlomBinds,
addToDirList ref path
= do paths <- readIORef ref
shiny_new_ones <- splitUp path
- writeIORef ref (paths ++ shiny_new_ones)
-
+ writeIORef ref (paths ++ filter (not.null) shiny_new_ones)
+ -- empty paths are ignored: there might be a trailing
+ -- ':' in the initial list, for example. Empty paths can
+ -- cause confusion when they are translated into -I options
+ -- for passing to gcc.
where
splitUp ::String -> IO [String]
#ifdef mingw32_TARGET_OS