Commit d1c1b7d0 authored by simonmar's avatar simonmar

[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.
parent 6a51f7df
......@@ -112,7 +112,7 @@ import Maybes ( orElse )
import SrcLoc ( SrcLoc )
import Outputable
import Unique ( Unique, mkBuiltinUnique )
import CmdLineOpts ( opt_NoStateHack )
import StaticFlags ( opt_NoStateHack )
-- infixl so you can say (id `set` a `set` b)
infixl 1 `setIdUnfolding`,
......
......@@ -24,7 +24,7 @@ module NewDemand(
#include "HsVersions.h"
import CmdLineOpts ( opt_CprOff )
import StaticFlags ( opt_CprOff )
import BasicTypes ( Arity )
import VarEnv ( VarEnv, emptyVarEnv, isEmptyVarEnv )
import UniqFM ( ufmToList )
......
......@@ -41,7 +41,7 @@ import UniqFM
import Unique ( Unique, deriveUnique, getUnique )
import Util ( zipEqual, foldl2 )
import Maybes ( orElse, isJust )
import CmdLineOpts ( opt_PprStyle_Debug )
import StaticFlags( opt_PprStyle_Debug )
import Outputable
import FastTypes
\end{code}
......
......@@ -99,7 +99,8 @@ module CLabel (
#include "HsVersions.h"
import CmdLineOpts ( DynFlags, opt_Static, opt_DoTickyProfiling )
import DynFlags ( DynFlags )
import StaticFlags ( opt_Static, opt_DoTickyProfiling )
import Packages ( isHomeModule, isDllName )
import DataCon ( ConTag )
import Module ( moduleFS, Module )
......
......@@ -37,7 +37,8 @@ import Literal ( mkMachInt )
import Unique
import UniqFM
import SrcLoc
import CmdLineOpts ( DynFlags, DynFlag(..), opt_SccProfilingOn )
import DynFlags ( DynFlags, DynFlag(..) )
import StaticFlags ( opt_SccProfilingOn )
import ErrUtils ( printError, dumpIfSet_dyn, showPass )
import StringBuffer ( hGetStringBuffer )
import FastString
......
......@@ -37,7 +37,7 @@ import UniqFM ( eltsUFM )
import FastString
import Outputable
import Constants
import CmdLineOpts ( opt_EnsureSplittableC )
import StaticFlags ( opt_SplitObjs )
-- The rest
import Data.List ( intersperse, groupBy )
......@@ -67,8 +67,8 @@ writeCs handle cmms = printForUser handle alwaysQualify (pprCs cmms)
-- ToDo: should be printForC
split_marker
| opt_EnsureSplittableC = ptext SLIT("__STG_SPLIT_MARKER")
| otherwise = empty
| opt_SplitObjs = ptext SLIT("__STG_SPLIT_MARKER")
| otherwise = empty
-- --------------------------------------------------------------------------
-- Now do some real work
......
......@@ -58,7 +58,7 @@ import TyCon ( TyCon, tyConFamilySize )
import Bitmap ( Bitmap, mAX_SMALL_BITMAP_SIZE,
mkBitmap, intsToReverseBitmap )
import Util ( isn'tIn, sortLe )
import CmdLineOpts ( opt_Unregisterised )
import StaticFlags ( opt_Unregisterised )
import FastString ( LitString )
import Outputable
import DATA_BITS
......
%
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
% $Id: CgCase.lhs,v 1.72 2004/11/26 16:19:59 simonmar Exp $
% $Id: CgCase.lhs,v 1.73 2005/03/18 13:37:38 simonmar Exp $
%
%********************************************************
%* *
......@@ -48,7 +48,7 @@ import CmmUtils ( CmmStmts, noStmts, oneStmt, plusStmts )
import Cmm
import MachOp ( wordRep )
import ClosureInfo ( mkLFArgument )
import CmdLineOpts ( opt_SccProfilingOn )
import StaticFlags ( opt_SccProfilingOn )
import Id ( Id, idName, isDeadBinder, idType )
import ForeignCall ( ForeignCall(..), CCallSpec(..), playSafe )
import VarSet ( varSetElems )
......
%
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
% $Id: CgClosure.lhs,v 1.66 2004/12/08 14:32:29 simonpj Exp $
% $Id: CgClosure.lhs,v 1.67 2005/03/18 13:37:40 simonmar Exp $
%
\section[CgClosure]{Code generation for closures}
......@@ -42,7 +42,7 @@ import CmmUtils ( CmmStmts, mkStmts, oneStmt, plusStmts, noStmts,
mkLblExpr )
import CLabel
import StgSyn
import CmdLineOpts ( opt_DoTickyProfiling )
import StaticFlags ( opt_DoTickyProfiling )
import CostCentre
import Id ( Id, idName, idType )
import Name ( Name )
......
......@@ -32,7 +32,7 @@ import MachOp
import SMRep
import ForeignCall
import Constants
import CmdLineOpts ( opt_SccProfilingOn )
import StaticFlags ( opt_SccProfilingOn )
import Outputable
import Monad ( when )
......
%
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
% $Id: CgHeapery.lhs,v 1.43 2005/02/10 13:01:53 simonmar Exp $
% $Id: CgHeapery.lhs,v 1.44 2005/03/18 13:37:42 simonmar Exp $
%
\section[CgHeapery]{Heap management functions}
......@@ -53,7 +53,7 @@ import TyCon ( tyConPrimRep )
import CostCentre ( CostCentreStack )
import Util ( mapAccumL, filterOut )
import Constants ( wORD_SIZE )
import CmdLineOpts ( DynFlags )
import DynFlags ( DynFlags )
import Outputable
import GLAEXTS
......
......@@ -57,7 +57,8 @@ import StgSyn ( SRT(..) )
import Name ( Name )
import DataCon ( DataCon, dataConTag, fIRST_TAG )
import Unique ( Uniquable(..) )
import CmdLineOpts ( opt_SccProfilingOn, DynFlags(..), HscTarget(..) )
import DynFlags ( DynFlags(..), HscTarget(..) )
import StaticFlags ( opt_SccProfilingOn )
import ListSetOps ( assocDefault )
import Maybes ( isJust )
import Constants ( wORD_SIZE, sIZEOF_StgFunInfoExtraRev )
......
%
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
% $Id: CgMonad.lhs,v 1.43 2004/12/08 14:32:31 simonpj Exp $
% $Id: CgMonad.lhs,v 1.44 2005/03/18 13:37:44 simonmar Exp $
%
\section[CgMonad]{The code generation monad}
......@@ -61,7 +61,7 @@ module CgMonad (
import {-# SOURCE #-} CgBindery ( CgBindings, nukeVolatileBinds )
import CmdLineOpts ( DynFlags )
import DynFlags ( DynFlags )
import Cmm
import CmmUtils ( CmmStmts, isNopStmt )
import CLabel
......
......@@ -12,7 +12,7 @@ import CgMonad
import CgCallConv ( mkRegLiveness )
import Id ( Id )
import Cmm ( CmmLit, GlobalReg(..), node, CmmExpr )
import CmdLineOpts ( opt_GranMacros )
import StaticFlags ( opt_GranMacros )
import Outputable
staticParHdr :: [CmmLit]
......
......@@ -47,7 +47,7 @@ import Module ( moduleUserString )
import Id ( Id )
import CostCentre
import StgSyn ( GenStgExpr(..), StgExpr )
import CmdLineOpts ( opt_SccProfilingOn )
import StaticFlags ( opt_SccProfilingOn )
import FastString ( FastString, mkFastString, LitString )
import Constants -- Lots of field offsets
import Outputable
......
......@@ -53,7 +53,7 @@ import CLabel ( CLabel, mkRtsDataLabel, mkRednCountsLabel )
import Name ( isInternalName )
import Id ( Id, idType )
import CmdLineOpts ( opt_DoTickyProfiling )
import StaticFlags ( opt_DoTickyProfiling )
import BasicTypes ( Arity )
import FastString ( FastString, mkFastString, LitString )
import Constants -- Lots of field offsets
......
......@@ -52,7 +52,7 @@ import CLabel ( CLabel, mkStringLitLabel )
import Digraph ( SCC(..), stronglyConnComp )
import ListSetOps ( assocDefault )
import Util ( filterOut, sortLe )
import CmdLineOpts ( DynFlags(..), HscTarget(..) )
import DynFlags ( DynFlags(..), HscTarget(..) )
import FastString ( LitString, FastString, unpackFS )
import Outputable
......
......@@ -63,7 +63,8 @@ import CLabel
import Constants ( mIN_UPD_SIZE, mIN_SIZE_NonUpdHeapObject )
import Packages ( isDllName )
import CmdLineOpts ( DynFlags, opt_SccProfilingOn, opt_OmitBlackHoling,
import DynFlags ( DynFlags )
import StaticFlags ( opt_SccProfilingOn, opt_OmitBlackHoling,
opt_Parallel, opt_DoTickyProfiling,
opt_SMP )
import Id ( Id, idType, idArity, idName )
......
......@@ -19,8 +19,6 @@ module CodeGen ( codeGen ) where
#include "HsVersions.h"
import DriverState ( v_Build_tag, v_MainModIs )
-- Kludge (??) so that CgExpr is reached via at least one non-SOURCE
-- import. Before, that wasn't the case, and CM therefore didn't
-- bother to compile it.
......@@ -41,8 +39,8 @@ import MachOp ( wordRep, MachHint(..) )
import StgSyn
import PrelNames ( gHC_PRIM, rOOT_MAIN, mAIN, pREL_TOP_HANDLER )
import CmdLineOpts ( DynFlags, DynFlag(..), opt_EnsureSplittableC,
opt_SccProfilingOn )
import DynFlags ( DynFlags(..), DynFlag(..) )
import StaticFlags ( opt_SplitObjs, opt_SccProfilingOn )
import HscTypes ( ForeignStubs(..), TypeEnv, typeEnvTyCons )
import CostCentre ( CollectedCCs )
......@@ -75,8 +73,8 @@ codeGen dflags this_mod type_env foreign_stubs imported_mods
cost_centre_info stg_binds
= do
{ showPass dflags "CodeGen"
; way <- readIORef v_Build_tag
; mb_main_mod <- readIORef v_MainModIs
; let way = buildTag dflags
mb_main_mod = mainModIs dflags
; let tycons = typeEnvTyCons type_env
data_tycons = filter isDataTyCon tycons
......@@ -346,7 +344,7 @@ which refers to this name).
\begin{code}
maybeExternaliseId :: Id -> FCode Id
maybeExternaliseId id
| opt_EnsureSplittableC, -- Externalise the name for -split-objs
| opt_SplitObjs, -- Externalise the name for -split-objs
isInternalName name = do { mod <- moduleName
; returnFC (setIdName id (externalise mod)) }
| otherwise = returnFC id
......
......@@ -42,7 +42,8 @@ import Id ( Id, idType )
import Type ( Type, typePrimRep, PrimRep(..) )
import TyCon ( TyCon, tyConPrimRep )
import MachOp-- ( MachRep(..), MachHint(..), wordRep )
import CmdLineOpts ( opt_SccProfilingOn, opt_GranMacros, opt_Unregisterised )
import StaticFlags ( opt_SccProfilingOn, opt_GranMacros,
opt_Unregisterised )
import Constants
import Outputable
......
......@@ -10,7 +10,7 @@ module CompManager (
CmState, -- Abstract
cmInit, -- :: GhciMode -> IO CmState
cmInit, -- :: GhcMode -> IO CmState
cmDepAnal, -- :: CmState -> [FilePath] -> IO ModuleGraph
cmDownsweep,
......@@ -58,19 +58,18 @@ where
import Packages ( isHomePackage )
import DriverPipeline ( CompResult(..), preprocess, compile, link )
import HscMain ( newHscEnv )
import DriverState ( v_Output_file, v_NoHsMain, v_MainModIs )
import DriverPhases ( HscSource(..), hscSourceString, isHaskellSrcFilename )
import Finder ( findModule, findLinkable, addHomeModuleToFinder,
flushFinderCache, mkHomeModLocation, FindResult(..), cantFindError )
import HscTypes ( ModSummary(..), HomeModInfo(..), ModIface(..), msHsFilePath,
HscEnv(..), GhciMode(..), isBootSummary,
import HscTypes ( ModSummary(..), HomeModInfo(..), ModIface(..),
msHsFilePath, HscEnv(..), isBootSummary,
InteractiveContext(..), emptyInteractiveContext,
HomePackageTable, emptyHomePackageTable, IsBootInterface,
Linkable(..), isObjectLinkable )
import Module ( Module, mkModule, delModuleEnv, delModuleEnvList, mkModuleEnv,
lookupModuleEnv, moduleEnvElts, extendModuleEnv, filterModuleEnv,
moduleUserString, addBootSuffixLocn,
ModLocation(..) )
HomePackageTable, emptyHomePackageTable,
IsBootInterface, Linkable(..), isObjectLinkable )
import Module ( Module, mkModule, delModuleEnv, delModuleEnvList,
mkModuleEnv, lookupModuleEnv, moduleEnvElts,
extendModuleEnv, filterModuleEnv, moduleUserString,
addBootSuffixLocn, ModLocation(..) )
import GetImports ( getImports )
import Digraph ( SCC(..), stronglyConnComp, flattenSCC, flattenSCCs )
import ErrUtils ( showPass )
......@@ -80,12 +79,10 @@ import StringBuffer ( hGetStringBuffer )
import Util
import Outputable
import Panic
import CmdLineOpts ( DynFlags(..) )
import DynFlags ( DynFlags(..), DynFlag(..), GhcMode(..), dopt )
import Maybes ( expectJust, orElse, mapCatMaybes )
import FiniteMap
import DATA_IOREF ( readIORef )
#ifdef GHCI
import Finder ( findPackageModule )
import HscMain ( hscGetInfo, GetInfoResult, hscStmt, hscTcExpr, hscKcType )
......@@ -102,7 +99,7 @@ import Linker ( HValue, unload, extendLinkEnv )
import GHC.Exts ( unsafeCoerce# )
import Foreign
import Control.Exception as Exception ( Exception, try )
import CmdLineOpts ( DynFlag(..), dopt_unset, dopt )
import DynFlags ( DynFlag(..), dopt_unset, dopt )
#endif
import EXCEPTION ( throwDyn )
......@@ -183,9 +180,9 @@ cmGetPrintUnqual cmstate = icPrintUnqual (cm_ic cmstate)
cmHPT cmstate = hsc_HPT (cm_hsc cmstate)
#endif
cmInit :: GhciMode -> DynFlags -> IO CmState
cmInit ghci_mode dflags
= do { hsc_env <- newHscEnv ghci_mode dflags
cmInit :: DynFlags -> IO CmState
cmInit dflags
= do { hsc_env <- newHscEnv dflags
; return (CmState { cm_hsc = hsc_env,
cm_mg = emptyMG,
cm_ic = emptyInteractiveContext })}
......@@ -499,8 +496,8 @@ cmUnload state@CmState{ cm_hsc = hsc_env }
return (discardCMInfo state)
cm_unload hsc_env stable_linkables -- Unload everthing *except* 'stable_linkables'
= case hsc_mode hsc_env of
Batch -> return ()
= case ghcMode (hsc_dflags hsc_env) of
BatchCompile -> return ()
#ifdef GHCI
Interactive -> Linker.unload (hsc_dflags hsc_env) stable_linkables
#else
......@@ -523,7 +520,7 @@ cm_unload hsc_env stable_linkables -- Unload everthing *except* 'stable_linkable
cmDepAnal :: CmState -> [FilePath] -> IO ModuleGraph
cmDepAnal cmstate rootnames
= do showPass dflags "Chasing dependencies"
when (verbosity dflags >= 1 && gmode == Batch) $
when (verbosity dflags >= 1 && gmode == BatchCompile) $
hPutStrLn stderr (showSDoc (hcat [
text "Chasing modules from: ",
hcat (punctuate comma (map text rootnames))]))
......@@ -531,7 +528,7 @@ cmDepAnal cmstate rootnames
where
hsc_env = cm_hsc cmstate
dflags = hsc_dflags hsc_env
gmode = hsc_mode hsc_env
gmode = ghcMode (hsc_dflags hsc_env)
-----------------------------------------------------------------------------
-- The real business of the compilation manager: given a system state and
......@@ -548,7 +545,7 @@ cmLoadModules cmstate1 mg2unsorted
= do -- version 1's are the original, before downsweep
let hsc_env = cm_hsc cmstate1
let hpt1 = hsc_HPT hsc_env
let ghci_mode = hsc_mode hsc_env -- this never changes
let ghci_mode = ghcMode (hsc_dflags hsc_env) -- this never changes
let dflags = hsc_dflags hsc_env -- this never changes
let verb = verbosity dflags
......@@ -676,16 +673,15 @@ cmLoadModules cmstate1 mg2unsorted
-- Clean up after ourselves
cleanTempFilesExcept dflags (ppFilesFromSummaries modsDone)
-- Issue a warning for the confusing case where the user
-- said '-o foo' but we're not going to do any linking.
-- We attempt linking if either (a) one of the modules is
-- called Main, or (b) the user said -no-hs-main, indicating
-- that main() is going to come from somewhere else.
--
ofile <- readIORef v_Output_file
no_hs_main <- readIORef v_NoHsMain
mb_main_mod <- readIORef v_MainModIs
let ofile = outputFile dflags
let no_hs_main = dopt Opt_NoHsMain dflags
let mb_main_mod = mainModIs dflags
let
main_mod = mb_main_mod `orElse` "Main"
a_root_is_Main
......@@ -693,7 +689,7 @@ cmLoadModules cmstate1 mg2unsorted
mg2unsorted
do_linking = a_root_is_Main || no_hs_main
when (ghci_mode == Batch && isJust ofile && not do_linking
when (ghci_mode == BatchCompile && isJust ofile && not do_linking
&& verb > 0) $
hPutStrLn stderr ("Warning: output was redirected with -o, " ++
"but no output will be generated\n" ++
......@@ -778,7 +774,7 @@ ppFilesFromSummaries summaries = [ fn | Just fn <- map ms_hspp_file summaries ]
-- ToDo: this pass could be merged with the preUpsweep.
getValidLinkables
:: GhciMode
:: GhcMode
-> [Linkable] -- old linkables
-> [Module] -- all home modules
-> [SCC ModSummary] -- all modules in the program, dependency order
......@@ -801,7 +797,7 @@ getValidLinkables mode old_linkables all_home_mods module_graph
getValidLinkablesSCC
:: GhciMode
:: GhcMode
-> [Linkable] -- old linkables
-> [Module] -- all home modules
-> [(Linkable,Bool)]
......@@ -823,7 +819,7 @@ getValidLinkablesSCC mode old_linkables all_home_mods new_linkables scc0
Nothing -> False
Just l -> isObjectLinkable l
objects_allowed = mode == Batch || all has_object scc_allhomeimps
objects_allowed = mode == BatchCompile || all has_object scc_allhomeimps
in do
new_linkables'
......@@ -1256,7 +1252,7 @@ summariseFile dflags file
(srcimps,the_imps,mod) <- getImports dflags' buf hspp_fn
-- Make a ModLocation for this file
location <- mkHomeModLocation mod file
location <- mkHomeModLocation dflags mod file
-- Tell the Finder cache where it is, so that subsequent calls
-- to findModule will find it, even if it's not on any search path
......
......@@ -38,7 +38,8 @@ import Type ( Type, tyVarsOfType, coreEqType,
getTvSubstEnv, getTvInScope )
import TyCon ( isPrimTyCon )
import BasicTypes ( RecFlag(..), Boxity(..), isNonRec )
import CmdLineOpts
import StaticFlags ( opt_PprStyle_Debug )
import DynFlags ( DynFlags, DynFlag(..), dopt )
import Outputable
#ifdef DEBUG
......
......@@ -35,7 +35,7 @@ import UniqSupply
import Maybes
import OrdList
import ErrUtils
import CmdLineOpts
import DynFlags
import Util ( listLengthCmp )
import Outputable
\end{code}
......
......@@ -49,7 +49,7 @@ module CoreSyn (
#include "HsVersions.h"
import CmdLineOpts ( opt_RuntimeTypes )
import StaticFlags ( opt_RuntimeTypes )
import CostCentre ( CostCentre, noCostCentre )
import Var ( Var, Id, TyVar, isTyVar, isId )
import Type ( Type, mkTyVarTy, seqType )
......
......@@ -30,13 +30,11 @@ module CoreUnfold (
#include "HsVersions.h"
import CmdLineOpts ( opt_UF_CreationThreshold,
opt_UF_UseThreshold,
opt_UF_FunAppDiscount,
opt_UF_KeenessFactor,
import StaticFlags ( opt_UF_CreationThreshold, opt_UF_UseThreshold,
opt_UF_FunAppDiscount, opt_UF_KeenessFactor,
opt_UF_DearOp,
DynFlags, DynFlag(..), dopt
)
import DynFlags ( DynFlags, DynFlag(..), dopt )
import CoreSyn
import PprCore ( pprCoreExpr )
import OccurAnal ( occurAnalyseGlobalExpr )
......
......@@ -47,7 +47,7 @@ import VarSet ( unionVarSet )
import VarEnv
import Name ( hashName )
import Packages ( isDllName )
import CmdLineOpts ( DynFlags )
import DynFlags ( DynFlags )
import Literal ( hashLiteral, literalType, litIsDupable,
litIsTrivial, isZeroLit, Literal( MachLabel ) )
import DataCon ( DataCon, dataConRepArity, dataConArgTys,
......
......@@ -32,7 +32,8 @@ import Literal
import Name
import Outputable
import ForeignCall
import CmdLineOpts
import DynFlags ( DynFlags(..) )
import StaticFlags ( opt_EmitExternalCore )
import Maybes ( mapCatMaybes )
import IO
import FastString
......
......@@ -11,7 +11,7 @@ module CprAnalyse ( cprAnalyse ) where
#include "HsVersions.h"
import CmdLineOpts ( DynFlags, DynFlag(..) )
import DynFlags ( DynFlags, DynFlag(..) )
import CoreLint ( showPass, endPass )
import CoreSyn
import CoreUtils ( exprIsValue )
......
......@@ -8,9 +8,10 @@ module Desugar ( deSugar, deSugarExpr ) where
#include "HsVersions.h"
import CmdLineOpts ( DynFlag(..), DynFlags(..), dopt, opt_SccProfilingOn )
import DynFlags ( DynFlag(..), DynFlags(..), dopt, GhcMode(..) )
import StaticFlags ( opt_SccProfilingOn )
import DriverPhases ( isHsBoot )
import HscTypes ( ModGuts(..), ModGuts, HscEnv(..), GhciMode(..),
import HscTypes ( ModGuts(..), ModGuts, HscEnv(..),
Dependencies(..), TypeEnv, IsBootInterface )
import HsSyn ( RuleDecl(..), RuleBndr(..), HsExpr(..), LHsExpr,
HsBindGroup(..), LRuleDecl, HsBind(..) )
......@@ -167,7 +168,7 @@ deSugar hsc_env
where
dflags = hsc_dflags hsc_env
ghci_mode = hsc_mode hsc_env
ghci_mode = ghcMode (hsc_dflags hsc_env)
auto_scc | opt_SccProfilingOn = TopLevel
| otherwise = NoSccs
......
......@@ -24,7 +24,8 @@ import HsSyn -- lots of things
import CoreSyn -- lots of things
import CoreUtils ( exprType, mkInlineMe, mkSCC )
import CmdLineOpts ( opt_AutoSccsOnAllToplevs, opt_AutoSccsOnExportedToplevs )
import StaticFlags ( opt_AutoSccsOnAllToplevs,
opt_AutoSccsOnExportedToplevs )
import CostCentre ( mkAutoCC, IsCafCC(..) )
import Id ( idType, idName, isExportedId, isSpecPragmaId, Id )
import NameSet
......
......@@ -18,7 +18,8 @@ import CoreSyn
import DsMonad -- the monadery used in the desugarer
import DsUtils
import CmdLineOpts ( DynFlag(..), dopt, opt_RulesOff )
import DynFlags ( DynFlag(..), dopt )
import StaticFlags ( opt_RulesOff )
import CoreUtils ( exprType, mkIfThenElse )
import Id ( idType )
import Var ( Id )
......
......@@ -52,7 +52,7 @@ import UniqSupply ( UniqSupply, uniqsFromSupply )
import Name ( Name, nameOccName )
import NameEnv
import OccName ( occNameFS )
import CmdLineOpts ( DynFlags )
import DynFlags ( DynFlags )
import ErrUtils ( WarnMsg, mkWarnMsg )
import Bag ( mapBag )
......
......@@ -8,7 +8,7 @@ module Match ( match, matchWrapper, matchSimply, matchSinglePat ) where
#include "HsVersions.h"
import CmdLineOpts ( DynFlag(..), dopt )
import DynFlags ( DynFlag(..), dopt )
import HsSyn
import TcHsSyn ( hsPatType )
import Check ( check, ExhaustivePat )
......
......@@ -41,7 +41,7 @@ import VarSet ( VarSet, varSetElems )
import TysPrim ( arrayPrimTyCon, mutableArrayPrimTyCon,
byteArrayPrimTyCon, mutableByteArrayPrimTyCon
)
import CmdLineOpts ( DynFlags, DynFlag(..) )
import DynFlags ( DynFlags, DynFlag(..) )
import ErrUtils ( showPass, dumpIfSet_dyn )
import Unique ( mkPseudoUniqueE )
import FastString ( FastString(..), unpackFS )
......
{-# OPTIONS -#include "Linker.h" #-}
-----------------------------------------------------------------------------
-- $Id: InteractiveUI.hs,v 1.193 2005/03/08 09:47:43 simonpj Exp $
-- $Id: InteractiveUI.hs,v 1.194 2005/03/18 13:38:31 simonmar Exp $
--
-- GHC Interactive User Interface
--
......@@ -21,22 +21,20 @@ import IfaceSyn ( IfaceDecl(..), IfaceClassOp(..), IfaceConDecls(..),
pprIfaceDeclHead, pprParendIfaceType,
pprIfaceForAllPart, pprIfaceType )
import FunDeps ( pprFundeps )
import DriverFlags
import DriverState
import DriverUtil ( remove_spaces )
import Util ( removeSpaces )
import Linker ( showLinkerState, linkPackages )
import Util
import Name ( Name, NamedThing(..) )
import OccName ( OccName, parenSymOcc, occNameUserString )
import BasicTypes ( StrictnessMark(..), defaultFixity, SuccessFlag(..) )
import Outputable
import CmdLineOpts ( DynFlags(..), DynFlag(..), dopt )
import DynFlags ( DynFlags(..), DynFlag(..), dopt )
import Panic hiding ( showException )
import Config
import SrcLoc ( SrcLoc, isGoodSrcLoc )
#ifndef mingw32_HOST_OS
import DriverUtil( handle )
import Util ( handle )
import System.Posix