summaryrefslogtreecommitdiff
path: root/ghc/compiler/simplStg
diff options
context:
space:
mode:
authorsimonmar <unknown>2005-03-18 13:41:59 +0000
committersimonmar <unknown>2005-03-18 13:41:59 +0000
commitd1c1b7d0e7b94ede238845c91f58582bad3b3ef3 (patch)
treed667497b2911fd03c3a51df69ed4325345135964 /ghc/compiler/simplStg
parent6a51f7df593cf73f4093bb1948d62db504fa6631 (diff)
downloadhaskell-d1c1b7d0e7b94ede238845c91f58582bad3b3ef3.tar.gz
[project @ 2005-03-18 13:37:27 by simonmar]
Flags cleanup. Basically the purpose of this commit is to move more of the compiler's global state into DynFlags, which is moving in the direction we need to go for the GHC API which can have multiple active sessions supported by a single GHC instance. Before: $ grep 'global_var' */*hs | wc -l 78 After: $ grep 'global_var' */*hs | wc -l 27 Well, it's an improvement. Most of what's left won't really affect our ability to host multiple sessions. Lots of static flags have become dynamic flags (yay!). Notably lots of flags that we used to think of as "driver" flags, like -I and -L, are now dynamic. The most notable static flags left behind are the "way" flags, eg. -prof. It would be nice to fix this, but it isn't urgent. On the way, lots of cleanup has happened. Everything related to static and dynamic flags lives in StaticFlags and DynFlags respectively, and they share a common command-line parser library in CmdLineParser. The flags related to modes (--makde, --interactive etc.) are now private to the front end: in fact private to Main itself, for now.
Diffstat (limited to 'ghc/compiler/simplStg')
-rw-r--r--ghc/compiler/simplStg/SimplStg.lhs8
1 files changed, 3 insertions, 5 deletions
diff --git a/ghc/compiler/simplStg/SimplStg.lhs b/ghc/compiler/simplStg/SimplStg.lhs
index bdb8c761c8..36b47d8dd8 100644
--- a/ghc/compiler/simplStg/SimplStg.lhs
+++ b/ghc/compiler/simplStg/SimplStg.lhs
@@ -16,9 +16,8 @@ import StgLint ( lintStgBindings )
import StgStats ( showStgStats )
import SRT ( computeSRTs )
-import CmdLineOpts ( DynFlags, DynFlag(..), dopt,
- StgToDo(..), dopt_StgToDo
- )
+import DynFlags ( DynFlags(..), DynFlag(..), dopt, StgToDo(..),
+ getStgToDo )
import Id ( Id )
import Module ( Module )
import ErrUtils ( doIfSet_dyn, dumpIfSet_dyn, showPass )
@@ -44,8 +43,7 @@ stg2stg dflags module_name binds
-- Do the main business!
; (processed_binds, _, cost_centres)
- <- foldl_mn do_stg_pass (binds', us', ccs)
- (dopt_StgToDo dflags)
+ <- foldl_mn do_stg_pass (binds', us', ccs) (getStgToDo dflags)
; let srt_binds = computeSRTs processed_binds