[project @ 2005-03-18 13:37:27 by simonmar]
authorsimonmar <unknown>
Fri, 18 Mar 2005 13:41:59 +0000 (13:41 +0000)
committersimonmar <unknown>
Fri, 18 Mar 2005 13:41:59 +0000 (13:41 +0000)
commitd1c1b7d0e7b94ede238845c91f58582bad3b3ef3
treed667497b2911fd03c3a51df69ed4325345135964
parent6a51f7df593cf73f4093bb1948d62db504fa6631
[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.
118 files changed:
ghc/compiler/basicTypes/Id.lhs
ghc/compiler/basicTypes/NewDemand.lhs
ghc/compiler/basicTypes/VarEnv.lhs
ghc/compiler/cmm/CLabel.hs
ghc/compiler/cmm/CmmParse.y
ghc/compiler/cmm/PprC.hs
ghc/compiler/codeGen/CgCallConv.hs
ghc/compiler/codeGen/CgCase.lhs
ghc/compiler/codeGen/CgClosure.lhs
ghc/compiler/codeGen/CgForeignCall.hs
ghc/compiler/codeGen/CgHeapery.lhs
ghc/compiler/codeGen/CgInfoTbls.hs
ghc/compiler/codeGen/CgMonad.lhs
ghc/compiler/codeGen/CgParallel.hs
ghc/compiler/codeGen/CgProf.hs
ghc/compiler/codeGen/CgTicky.hs
ghc/compiler/codeGen/CgUtils.hs
ghc/compiler/codeGen/ClosureInfo.lhs
ghc/compiler/codeGen/CodeGen.lhs
ghc/compiler/codeGen/SMRep.lhs
ghc/compiler/compMan/CompManager.lhs
ghc/compiler/coreSyn/CoreLint.lhs
ghc/compiler/coreSyn/CorePrep.lhs
ghc/compiler/coreSyn/CoreSyn.lhs
ghc/compiler/coreSyn/CoreUnfold.lhs
ghc/compiler/coreSyn/CoreUtils.lhs
ghc/compiler/coreSyn/MkExternalCore.lhs
ghc/compiler/cprAnalysis/CprAnalyse.lhs
ghc/compiler/deSugar/Desugar.lhs
ghc/compiler/deSugar/DsBinds.lhs
ghc/compiler/deSugar/DsListComp.lhs
ghc/compiler/deSugar/DsMonad.lhs
ghc/compiler/deSugar/Match.lhs
ghc/compiler/ghci/ByteCodeGen.lhs
ghc/compiler/ghci/InteractiveUI.hs
ghc/compiler/ghci/Linker.lhs
ghc/compiler/ghci/ObjLink.lhs
ghc/compiler/hsSyn/HsTypes.lhs
ghc/compiler/iface/BinIface.hs
ghc/compiler/iface/LoadIface.lhs
ghc/compiler/iface/MkIface.lhs
ghc/compiler/iface/TcIface.lhs
ghc/compiler/ilxGen/IlxGen.lhs
ghc/compiler/main/CmdLineOpts.lhs [deleted file]
ghc/compiler/main/CmdLineParser.hs [new file with mode: 0644]
ghc/compiler/main/CodeOutput.lhs
ghc/compiler/main/DriverFlags.hs [deleted file]
ghc/compiler/main/DriverMkDepend.hs
ghc/compiler/main/DriverPhases.hs
ghc/compiler/main/DriverPipeline.hs
ghc/compiler/main/DriverState.hs [deleted file]
ghc/compiler/main/DriverUtil.hs [deleted file]
ghc/compiler/main/DynFlags.hs [new file with mode: 0644]
ghc/compiler/main/ErrUtils.lhs
ghc/compiler/main/Finder.lhs
ghc/compiler/main/GetImports.hs
ghc/compiler/main/HscMain.lhs
ghc/compiler/main/HscTypes.lhs
ghc/compiler/main/Main.hs
ghc/compiler/main/Packages.lhs
ghc/compiler/main/ParsePkgConf.y
ghc/compiler/main/StaticFlags.hs [new file with mode: 0644]
ghc/compiler/main/SysTools.lhs
ghc/compiler/main/TidyPgm.lhs
ghc/compiler/nativeGen/AsmCodeGen.lhs
ghc/compiler/nativeGen/MachCodeGen.hs
ghc/compiler/nativeGen/PositionIndependentCode.hs
ghc/compiler/nativeGen/PprMach.hs
ghc/compiler/nativeGen/RegisterAlloc.hs
ghc/compiler/ndpFlatten/FlattenInfo.hs
ghc/compiler/ndpFlatten/Flattening.hs
ghc/compiler/package.conf.in
ghc/compiler/parser/Lexer.x
ghc/compiler/parser/Parser.y.pp
ghc/compiler/prelude/PrelRules.lhs
ghc/compiler/profiling/SCCfinal.lhs
ghc/compiler/rename/RnBinds.lhs
ghc/compiler/rename/RnEnv.lhs
ghc/compiler/rename/RnExpr.lhs
ghc/compiler/rename/RnNames.lhs
ghc/compiler/rename/RnSource.lhs
ghc/compiler/rename/RnTypes.lhs
ghc/compiler/simplCore/CSE.lhs
ghc/compiler/simplCore/FloatIn.lhs
ghc/compiler/simplCore/FloatOut.lhs
ghc/compiler/simplCore/LiberateCase.lhs
ghc/compiler/simplCore/SetLevels.lhs
ghc/compiler/simplCore/SimplCore.lhs
ghc/compiler/simplCore/SimplEnv.lhs
ghc/compiler/simplCore/SimplMonad.lhs
ghc/compiler/simplCore/SimplUtils.lhs
ghc/compiler/simplCore/Simplify.lhs
ghc/compiler/simplStg/SimplStg.lhs
ghc/compiler/specialise/SpecConstr.lhs
ghc/compiler/specialise/Specialise.lhs
ghc/compiler/stgSyn/CoreToStg.lhs
ghc/compiler/stgSyn/StgSyn.lhs
ghc/compiler/stranal/DmdAnal.lhs
ghc/compiler/stranal/SaAbsInt.lhs
ghc/compiler/stranal/StrictAnal.lhs
ghc/compiler/stranal/WorkWrap.lhs
ghc/compiler/typecheck/Inst.lhs
ghc/compiler/typecheck/TcBinds.lhs
ghc/compiler/typecheck/TcClassDcl.lhs
ghc/compiler/typecheck/TcDeriv.lhs
ghc/compiler/typecheck/TcExpr.lhs
ghc/compiler/typecheck/TcForeign.lhs
ghc/compiler/typecheck/TcMType.lhs
ghc/compiler/typecheck/TcPat.lhs
ghc/compiler/typecheck/TcRnDriver.lhs
ghc/compiler/typecheck/TcRnMonad.lhs
ghc/compiler/typecheck/TcSimplify.lhs
ghc/compiler/typecheck/TcTyClsDecls.lhs
ghc/compiler/typecheck/TcType.lhs
ghc/compiler/types/InstEnv.lhs
ghc/compiler/types/Type.lhs
ghc/compiler/utils/Outputable.lhs
ghc/compiler/utils/Util.lhs