From eee2ba29efc7f7f9a0bb3a2696ff6f3b8b46b18b Mon Sep 17 00:00:00 2001 From: simonpj Date: Mon, 2 Jun 2003 13:27:41 +0000 Subject: [PATCH] [project @ 2003-06-02 13:27:33 by simonpj] Prune imports --- ghc/compiler/codeGen/CgTailCall.lhs | 4 ++-- ghc/compiler/codeGen/CgUpdate.lhs | 2 +- ghc/compiler/deSugar/DsCCall.lhs | 3 +-- ghc/compiler/main/HscMain.lhs | 3 --- ghc/compiler/nativeGen/AbsCStixGen.lhs | 3 +-- ghc/compiler/nativeGen/AsmCodeGen.lhs | 2 ++ ghc/compiler/nativeGen/MachRegs.lhs | 3 +-- ghc/compiler/nativeGen/PprMach.lhs | 1 - ghc/compiler/nativeGen/StixPrim.lhs | 3 +-- ghc/compiler/rename/RnNames.lhs | 5 ++--- ghc/compiler/typecheck/TcDeriv.lhs | 6 +++--- ghc/compiler/typecheck/TcForeign.lhs | 5 ++--- ghc/compiler/typecheck/TcMatches.lhs | 2 +- 13 files changed, 17 insertions(+), 25 deletions(-) diff --git a/ghc/compiler/codeGen/CgTailCall.lhs b/ghc/compiler/codeGen/CgTailCall.lhs index 9965895..9d5118a 100644 --- a/ghc/compiler/codeGen/CgTailCall.lhs +++ b/ghc/compiler/codeGen/CgTailCall.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % -% $Id: CgTailCall.lhs,v 1.37 2003/05/14 09:13:56 simonmar Exp $ +% $Id: CgTailCall.lhs,v 1.38 2003/06/02 13:27:34 simonpj Exp $ % %******************************************************** %* * @@ -32,7 +32,7 @@ import ClosureInfo import AbsCUtils ( mkAbstractCs, getAmodeRep ) import AbsCSyn -import CLabel ( mkUpdInfoLabel, mkRtsPrimOpLabel, mkSeqInfoLabel ) +import CLabel ( mkRtsPrimOpLabel, mkSeqInfoLabel ) import Id ( Id, idType, idName ) import DataCon ( DataCon, dataConTyCon, dataConTag, fIRST_TAG ) diff --git a/ghc/compiler/codeGen/CgUpdate.lhs b/ghc/compiler/codeGen/CgUpdate.lhs index eb539b1..879dafe 100644 --- a/ghc/compiler/codeGen/CgUpdate.lhs +++ b/ghc/compiler/codeGen/CgUpdate.lhs @@ -12,7 +12,7 @@ import CgMonad import AbsCSyn import CgStackery ( allocStackTop, updateFrameSize, setStackFrame ) -import CgUsages ( getVirtSp, getSpRelOffset ) +import CgUsages ( getVirtSp ) import Panic ( assertPanic ) \end{code} diff --git a/ghc/compiler/deSugar/DsCCall.lhs b/ghc/compiler/deSugar/DsCCall.lhs index 5ec8209..0186671 100644 --- a/ghc/compiler/deSugar/DsCCall.lhs +++ b/ghc/compiler/deSugar/DsCCall.lhs @@ -31,7 +31,6 @@ import Type ( Type, isUnLiftedType, mkFunTys, mkFunTy, tyVarsOfType, mkForAllTys, mkTyConApp, isPrimitiveType, splitTyConApp_maybe, splitNewType_maybe, splitForAllTy_maybe, - splitTyConApp, isUnboxedTupleType ) @@ -46,7 +45,7 @@ import TysWiredIn ( unitDataConId, unboxedSingletonTyCon, unboxedPairTyCon, trueDataCon, falseDataCon, trueDataConId, falseDataConId, - listTyCon, charTyCon, stringTy, + listTyCon, charTyCon, tupleTyCon, tupleCon ) import BasicTypes ( Boxity(..) ) diff --git a/ghc/compiler/main/HscMain.lhs b/ghc/compiler/main/HscMain.lhs index 23f00c9..d76027d 100644 --- a/ghc/compiler/main/HscMain.lhs +++ b/ghc/compiler/main/HscMain.lhs @@ -48,7 +48,6 @@ import MkIface ( mkIface ) import Desugar import Flattening ( flatten ) import SimplCore -import CoreUtils ( coreBindsSize ) import TidyPgm ( tidyCorePgm ) import CorePrep ( corePrepPgm ) import StgSyn @@ -72,8 +71,6 @@ import ParserCore import ParserCoreUtils import FiniteMap ( emptyFM ) import Name ( nameModule ) -import NameEnv ( emptyNameEnv ) -import NameSet ( emptyNameSet ) import Module ( Module, ModLocation(..), showModMsg ) import FastString import Maybes ( expectJust ) diff --git a/ghc/compiler/nativeGen/AbsCStixGen.lhs b/ghc/compiler/nativeGen/AbsCStixGen.lhs index 08fb706..6e848a7 100644 --- a/ghc/compiler/nativeGen/AbsCStixGen.lhs +++ b/ghc/compiler/nativeGen/AbsCStixGen.lhs @@ -34,9 +34,8 @@ import UniqSupply ( returnUs, thenUs, mapUs, getUniqueUs, UniqSM ) import Util ( naturalMergeSortLe ) import Panic ( panic ) import TyCon ( tyConDataCons ) -import Constants ( wORD_SIZE, bITMAP_BITS_SHIFT ) import Name ( NamedThing(..) ) -import CmdLineOpts ( opt_Static, opt_EnsureSplittableC ) +import CmdLineOpts ( opt_EnsureSplittableC ) import Outputable ( assertPanic ) -- DEBUGGING ONLY diff --git a/ghc/compiler/nativeGen/AsmCodeGen.lhs b/ghc/compiler/nativeGen/AsmCodeGen.lhs index 92a8bc2..6510b41 100644 --- a/ghc/compiler/nativeGen/AsmCodeGen.lhs +++ b/ghc/compiler/nativeGen/AsmCodeGen.lhs @@ -43,7 +43,9 @@ import FastString -- DEBUGGING ONLY --import OrdList +#ifdef NCG_DEBUG import List ( intersperse ) +#endif \end{code} The 96/03 native-code generator has machine-independent and diff --git a/ghc/compiler/nativeGen/MachRegs.lhs b/ghc/compiler/nativeGen/MachRegs.lhs index 20a1120..cdb9b1a 100644 --- a/ghc/compiler/nativeGen/MachRegs.lhs +++ b/ghc/compiler/nativeGen/MachRegs.lhs @@ -63,11 +63,10 @@ module MachRegs ( import AbsCSyn ( MagicId(..) ) import CLabel ( CLabel, mkMainCapabilityLabel ) -import MachOp ( MachOp(..) ) import PrimRep ( PrimRep(..), isFloatingRep ) import Stix ( StixExpr(..), StixReg(..), getUniqueNat, returnNat, thenNat, NatM ) -import Unique ( mkPseudoUnique2, Uniquable(..), Unique ) +import Unique ( Unique ) import Pretty import Outputable ( Outputable(..), pprPanic, panic ) import qualified Outputable diff --git a/ghc/compiler/nativeGen/PprMach.lhs b/ghc/compiler/nativeGen/PprMach.lhs index fae5f6c..45e6230 100644 --- a/ghc/compiler/nativeGen/PprMach.lhs +++ b/ghc/compiler/nativeGen/PprMach.lhs @@ -19,7 +19,6 @@ import MachMisc import CLabel ( pprCLabel, externallyVisibleCLabel, labelDynamic ) import Stix ( CodeSegment(..) ) -import Unique ( pprUnique ) import Panic ( panic ) import Pretty import FastString diff --git a/ghc/compiler/nativeGen/StixPrim.lhs b/ghc/compiler/nativeGen/StixPrim.lhs index 7583e1c..64932e3 100644 --- a/ghc/compiler/nativeGen/StixPrim.lhs +++ b/ghc/compiler/nativeGen/StixPrim.lhs @@ -19,8 +19,7 @@ import Literal ( Literal(..), word2IntLit ) import MachOp ( MachOp(..) ) import PrimRep ( PrimRep(..), getPrimRepSizeInBytes ) import UniqSupply ( returnUs, thenUs, getUniqueUs, UniqSM ) -import Constants ( wORD_SIZE, - mIN_INTLIKE, mIN_CHARLIKE, uF_UPDATEE, bLOCK_SIZE, +import Constants ( mIN_INTLIKE, mIN_CHARLIKE, uF_UPDATEE, bLOCK_SIZE, rESERVED_STACK_WORDS ) import CLabel ( mkIntlikeClosureLabel, mkCharlikeClosureLabel, mkMAP_FROZEN_infoLabel, diff --git a/ghc/compiler/rename/RnNames.lhs b/ghc/compiler/rename/RnNames.lhs index 12eb33a..8e06c6c 100644 --- a/ghc/compiler/rename/RnNames.lhs +++ b/ghc/compiler/rename/RnNames.lhs @@ -24,7 +24,7 @@ import RnEnv import TcRnMonad import FiniteMap -import PrelNames ( pRELUDE_Name, mAIN_Name, isBuiltInSyntaxName ) +import PrelNames ( pRELUDE_Name, isBuiltInSyntaxName ) import Module ( Module, ModuleName, ModuleEnv, moduleName, moduleNameUserString, isHomeModule, emptyModuleEnv, unitModuleEnvByName, unitModuleEnv, @@ -40,9 +40,8 @@ import HscTypes ( Provenance(..), ImportReason(..), GlobalRdrEnv, Deprecations(..), ModIface(..), Dependencies(..), GlobalRdrElt(..), unQualInScope, isLocalGRE, pprNameProvenance ) -import OccName ( varName ) import RdrName ( RdrName, rdrNameOcc, setRdrNameSpace, lookupRdrEnv, rdrEnvToList, - emptyRdrEnv, foldRdrEnv, rdrEnvElts, mkRdrUnqual, isQual, mkUnqual ) + emptyRdrEnv, foldRdrEnv, rdrEnvElts, mkRdrUnqual, isQual ) import Outputable import Maybe ( isJust, isNothing, catMaybes ) import Maybes ( orElse ) diff --git a/ghc/compiler/typecheck/TcDeriv.lhs b/ghc/compiler/typecheck/TcDeriv.lhs index 3e02116..13f52f5 100644 --- a/ghc/compiler/typecheck/TcDeriv.lhs +++ b/ghc/compiler/typecheck/TcDeriv.lhs @@ -10,10 +10,10 @@ module TcDeriv ( tcDeriving ) where #include "HsVersions.h" -import HsSyn ( HsBinds(..), MonoBinds(..), TyClDecl(..), +import HsSyn ( HsBinds(..), TyClDecl(..), andMonoBindList, collectMonoBinders ) import RdrHsSyn ( RdrNameMonoBinds ) -import RnHsSyn ( RenamedHsBinds, RenamedMonoBinds, RenamedTyClDecl, RenamedHsPred ) +import RnHsSyn ( RenamedHsBinds, RenamedTyClDecl, RenamedHsPred ) import CmdLineOpts ( DynFlag(..) ) import TcRnMonad @@ -38,7 +38,7 @@ import ErrUtils ( dumpIfSet_dyn ) import MkId ( mkDictFunId ) import DataCon ( dataConOrigArgTys, isNullaryDataCon, isExistentialDataCon ) import Maybes ( maybeToBool, catMaybes ) -import Name ( Name, getSrcLoc, nameUnique ) +import Name ( Name, getSrcLoc ) import Unique ( getUnique ) import NameSet import RdrName ( RdrName ) diff --git a/ghc/compiler/typecheck/TcForeign.lhs b/ghc/compiler/typecheck/TcForeign.lhs index ec2cffe..accb750 100644 --- a/ghc/compiler/typecheck/TcForeign.lhs +++ b/ghc/compiler/typecheck/TcForeign.lhs @@ -32,8 +32,7 @@ import TcHsSyn ( TcMonoBinds, TypecheckedForeignDecl, TcForeignDecl ) import TcExpr ( tcCheckSigma ) import ErrUtils ( Message ) -import Id ( Id, mkLocalId, mkVanillaGlobal, setIdLocalExported ) -import IdInfo ( noCafIdInfo ) +import Id ( Id, mkLocalId, setIdLocalExported ) import PrimRep ( getPrimRepSize, isFloatingRep ) import Type ( typePrimRep ) import OccName ( mkForeignExportOcc ) @@ -46,7 +45,7 @@ import TcType ( Type, tcSplitFunTys, tcSplitTyConApp_maybe, isFFIDynResultTy, isFFIDotnetTy, isFFIDotnetObjTy, toDNType ) -import ForeignCall ( CExportSpec(..), CCallTarget(..), CCallConv(..), +import ForeignCall ( CExportSpec(..), CCallTarget(..), isDynamicTarget, isCasmTarget, withDNTypes, DNKind(..), DNCallSpec(..) ) import CStrings ( CLabelString, isCLabelString ) import PrelNames ( hasKey, ioTyConKey ) diff --git a/ghc/compiler/typecheck/TcMatches.lhs b/ghc/compiler/typecheck/TcMatches.lhs index dd2c4a8..64a4505 100644 --- a/ghc/compiler/typecheck/TcMatches.lhs +++ b/ghc/compiler/typecheck/TcMatches.lhs @@ -48,7 +48,7 @@ import BasicTypes ( RecFlag(..) ) import VarSet import Var ( Id ) import Bag -import Util ( isSingleton, lengthExceeds, notNull, zipEqual ) +import Util ( isSingleton, notNull, zipEqual ) import Outputable import List ( nub ) -- 1.7.10.4