[project @ 2001-11-19 16:34:12 by simonpj]
authorsimonpj <unknown>
Mon, 19 Nov 2001 16:34:14 +0000 (16:34 +0000)
committersimonpj <unknown>
Mon, 19 Nov 2001 16:34:14 +0000 (16:34 +0000)
Tidy up imports

24 files changed:
ghc/compiler/basicTypes/Id.lhs
ghc/compiler/basicTypes/MkId.lhs
ghc/compiler/basicTypes/SrcLoc.lhs
ghc/compiler/codeGen/CgExpr.lhs
ghc/compiler/codeGen/CgHeapery.lhs
ghc/compiler/coreSyn/CorePrep.lhs
ghc/compiler/coreSyn/ExternalCore.lhs
ghc/compiler/main/Packages.lhs
ghc/compiler/nativeGen/StixInfo.lhs
ghc/compiler/nativeGen/StixMacro.lhs
ghc/compiler/rename/ParseIface.y
ghc/compiler/rename/RnEnv.lhs
ghc/compiler/simplCore/FloatIn.lhs
ghc/compiler/simplCore/SimplMonad.lhs
ghc/compiler/simplCore/Simplify.lhs
ghc/compiler/stranal/DmdAnal.lhs
ghc/compiler/stranal/WwLib.lhs
ghc/compiler/typecheck/Inst.lhs
ghc/compiler/typecheck/TcMatches.lhs
ghc/compiler/typecheck/TcMonad.lhs
ghc/compiler/typecheck/TcMonoType.lhs
ghc/compiler/typecheck/TcRules.lhs
ghc/compiler/utils/Outputable.lhs
ghc/compiler/utils/StringBuffer.lhs

index c4c3570..ee1f203 100644 (file)
@@ -90,9 +90,7 @@ import Type           ( Type, typePrimRep, addFreeTyVars,
 import IdInfo 
 
 import qualified Demand        ( Demand )
-import NewDemand       ( Demand, DmdResult(..), StrictSig, topSig, isBotRes,
-                         isBottomingSig, splitStrictSig, strictSigResInfo
-                       )
+import NewDemand       ( Demand, StrictSig, topSig, isBottomingSig )
 import Name            ( Name, OccName,
                          mkSysLocalName, mkLocalName,
                          getOccName, getSrcLoc
index f5998d2..c112a2a 100644 (file)
@@ -45,7 +45,7 @@ import TcType         ( Type, ThetaType, mkDictTy, mkPredTys, mkTyConApp,
                          tcSplitFunTys, tcSplitForAllTys, mkPredTy
                        )
 import Module          ( Module )
-import CoreUtils       ( mkInlineMe, exprType )
+import CoreUtils       ( exprType )
 import CoreUnfold      ( mkTopUnfolding, mkCompulsoryUnfolding, mkOtherCon )
 import Literal         ( Literal(..), nullAddrLit )
 import TyCon           ( TyCon, isNewTyCon, tyConTyVars, tyConDataCons,
@@ -71,10 +71,9 @@ import Id            ( idType, mkGlobalId, mkVanillaGlobal, mkSysLocal,
                        )
 import IdInfo          ( IdInfo, noCafNoTyGenIdInfo,
                          setUnfoldingInfo, 
-                         setArityInfo, setSpecInfo,  setCgInfo, setCafInfo,
+                         setArityInfo, setSpecInfo, setCafInfo,
                          newStrictnessFromOld, setAllStrictnessInfo,
-                         GlobalIdDetails(..), CafInfo(..), CprInfo(..), 
-                         CgInfo 
+                         GlobalIdDetails(..), CafInfo(..), CprInfo(..)
                        )
 import NewDemand       ( mkStrictSig, strictSigResInfo, DmdResult(..),
                          mkTopDmdType, topDmd, evalDmd, lazyDmd, 
index 7e29d67..3f89e97 100644 (file)
@@ -30,7 +30,7 @@ import Util           ( thenCmp )
 import Outputable
 import FastString      ( unpackFS )
 import FastTypes
-import GlaExts         ( Int(..), (+#) )
+import GlaExts         ( (+#) )
 \end{code}
 
 %************************************************************************
index a98a1bb..c350218 100644 (file)
@@ -1,7 +1,7 @@
 %
 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
 %
-% $Id: CgExpr.lhs,v 1.46 2001/10/25 02:13:11 sof Exp $
+% $Id: CgExpr.lhs,v 1.47 2001/11/19 16:34:12 simonpj Exp $
 %
 %********************************************************
 %*                                                     *
@@ -41,8 +41,7 @@ import Id             ( idPrimRep, idType, Id )
 import VarSet
 import PrimOp          ( primOpOutOfLine, getPrimOpResultInfo, PrimOp(..), PrimOpResultInfo(..) )
 import PrimRep         ( PrimRep(..), isFollowableRep )
-import TyCon           ( maybeTyConSingleCon,
-                         isUnboxedTupleTyCon, isEnumerationTyCon )
+import TyCon           ( isUnboxedTupleTyCon, isEnumerationTyCon )
 import Type            ( Type, typePrimRep, tyConAppArgs, tyConAppTyCon, repType )
 import Maybes          ( maybeToBool )
 import ListSetOps      ( assocMaybe )
index c855484..8c55d57 100644 (file)
@@ -1,7 +1,7 @@
 %
 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
 %
-% $Id: CgHeapery.lhs,v 1.26 2001/11/08 12:50:07 simonmar Exp $
+% $Id: CgHeapery.lhs,v 1.27 2001/11/19 16:34:12 simonpj Exp $
 %
 \section[CgHeapery]{Heap management functions}
 
@@ -31,7 +31,6 @@ import ClosureInfo    ( closureSize, closureGoodStuffSize,
 import PrimRep         ( PrimRep(..), isFollowableRep )
 import Unique          ( Unique )
 import CmdLineOpts     ( opt_SccProfilingOn, opt_GranMacros )
-import Constants       ( bLOCK_SIZE_W )
 import GlaExts
 import Outputable
 
index 6f607b4..1948974 100644 (file)
@@ -10,7 +10,7 @@ module CorePrep (
 
 #include "HsVersions.h"
 
-import CoreUtils( exprIsAtom, exprType, exprIsValue, etaExpand, exprArity, exprOkForSpeculation )
+import CoreUtils( exprType, exprIsValue, etaExpand, exprArity, exprOkForSpeculation )
 import CoreFVs ( exprFreeVars )
 import CoreLint        ( endPass )
 import CoreSyn
@@ -29,7 +29,7 @@ import Id     ( mkSysLocal, idType, idNewDemandInfo, idArity,
                )
 import HscTypes ( ModDetails(..), implicitTyThingIds, typeEnvElts )
 import Unique  ( mkBuiltinUnique )
-import BasicTypes ( Arity, TopLevelFlag(..), isTopLevel, isNotTopLevel,
+import BasicTypes ( TopLevelFlag(..), isTopLevel, isNotTopLevel,
                    RecFlag(..), isNonRec
                  )
 import UniqSupply
index 8ddc7da..2e86da9 100644 (file)
@@ -5,7 +5,6 @@
 
 module ExternalCore where
 
-import List (elemIndex)
 
 data Module 
  = Module Mname [Tdef] [Vdefg]
index 94eeb96..7c18904 100644 (file)
@@ -17,7 +17,7 @@ import Pretty
 import CmdLineOpts     ( dynFlag, verbosity )
 import DriverUtil      ( my_prefix_match )
 import ErrUtils                ( dumpIfSet )
-import Outputable      ( docToSDoc, trace )
+import Outputable      ( docToSDoc )
 \end{code}
 
 \begin{code}
index c23306f..af6fa72 100644 (file)
@@ -16,7 +16,6 @@ module StixInfo (
 #include "NCG.h"
 
 import AbsCSyn         ( AbstractC(..), Liveness(..), C_SRT(..), needsSRT )
-import CLabel          ( CLabel )
 import StgSyn          ( SRT(..) )
 import ClosureInfo     ( closurePtrsSize,
                          closureNonHdrSize, closureSMRep,
index d3888ed..bcb2ba6 100644 (file)
@@ -21,7 +21,7 @@ import Stix
 import UniqSupply      ( returnUs, thenUs, UniqSM )
 import CLabel          ( mkBlackHoleInfoTableLabel, mkIndStaticInfoLabel,
                          mkIndInfoLabel, mkUpdInfoLabel, mkSeqInfoLabel,
-                         mkRtsGCEntryLabel, mkStgUpdatePAPLabel )
+                         mkRtsGCEntryLabel )
 \end{code}
 
 The @ARGS_CHK_A{_LOAD_NODE}@ macros check for sufficient arguments on
index e1795a3..1fd883c 100644 (file)
@@ -43,7 +43,6 @@ import BasicTypes     ( Fixity(..), FixityDirection(..), StrictnessMark(..),
                        )
 import CostCentre       ( CostCentre(..), IsCafCC(..), IsDupdCC(..) )
 import Type            ( Kind, mkArrowKind, liftedTypeKind, openTypeKind, usageTypeKind )
-import IdInfo           ( InlinePragInfo(..) )
 import ForeignCall     ( ForeignCall(..), CCallConv(..), CCallSpec(..), CCallTarget(..) )
 import Lex             
 
index 6b1fcb8..11800c4 100644 (file)
@@ -57,8 +57,6 @@ import List           ( nub )
 import UniqFM          ( lookupWithDefaultUFM )
 import CmdLineOpts
 import FastString      ( FastString )
-
-import Maybe           ( isJust )
 \end{code}
 
 %*********************************************************
index be854af..2957520 100644 (file)
@@ -22,7 +22,7 @@ import CoreUtils      ( exprIsValue, exprIsDupable )
 import CoreLint                ( showPass, endPass )
 import CoreFVs         ( CoreExprWithFVs, freeVars, freeVarsOf )
 import Id              ( isOneShotLambda )
-import Var             ( Id, idType, isTyVar )
+import Var             ( Id, idType )
 import Type            ( isUnLiftedType )
 import VarSet
 import Util            ( zipEqual, zipWithEqual, count )
index adaa6c4..cfd606d 100644 (file)
@@ -52,9 +52,7 @@ module SimplMonad (
 
 #include "HsVersions.h"
 
-import Id              ( Id, idType, isDataConWrapId, 
-                         idOccInfo, idInlinePragma
-                       )
+import Id              ( Id, idType, idOccInfo, idInlinePragma )
 import CoreSyn
 import CoreUtils       ( needsCaseBinding, exprIsTrivial )
 import PprCore         ()      -- Instances
index 774fa57..a318c66 100644 (file)
@@ -38,15 +38,15 @@ import PprCore              ( pprParendExpr, pprCoreExpr )
 import CoreUnfold      ( mkOtherCon, mkUnfolding, otherCons, callSiteInline )
 import CoreUtils       ( exprIsDupable, exprIsTrivial, needsCaseBinding,
                          exprIsConApp_maybe, mkPiTypes, findAlt, 
-                         exprType, coreAltsType, exprIsValue, 
+                         exprType, exprIsValue, 
                          exprOkForSpeculation, exprArity, findDefault,
                          mkCoerce, mkSCC, mkInlineMe, mkAltExpr, applyTypeToArg
                        )
 import Rules           ( lookupRule )
 import BasicTypes      ( isMarkedStrict )
 import CostCentre      ( currentCCS )
-import Type            ( isUnLiftedType, seqType, mkFunTy, tyConAppArgs, funArgTy,
-                         funResultTy, splitFunTy_maybe, splitFunTy, eqType
+import Type            ( isUnLiftedType, seqType, tyConAppArgs, funArgTy,
+                         splitFunTy_maybe, splitFunTy, eqType
                        )
 import Subst           ( mkSubst, substTy, substExpr,
                          isInScope, lookupIdSubst, simplIdInfo
index e5934e5..f23802e 100644 (file)
@@ -31,7 +31,7 @@ import UniqFM         ( plusUFM_C, addToUFM_Directly, lookupUFM_Directly,
                          keysUFM, minusUFM, ufmToList, filterUFM )
 import Type            ( isUnLiftedType )
 import CoreLint                ( showPass, endPass )
-import Util            ( mapAndUnzip, mapAccumL, mapAccumR, lengthIs, equalLength )
+import Util            ( mapAndUnzip, mapAccumL, mapAccumR, lengthIs )
 import BasicTypes      ( Arity, TopLevelFlag(..), isTopLevel, isNeverActive )
 import Maybes          ( orElse, expectJust )
 import Outputable
index 2d60dd2..996907d 100644 (file)
@@ -17,9 +17,7 @@ import Id             ( Id, idType, mkSysLocal, idNewDemandInfo, setIdNewDemandInfo,
 import IdInfo          ( vanillaIdInfo )
 import DataCon         ( splitProductType_maybe, splitProductType )
 import NewDemand       ( Demand(..), DmdResult(..), Demands(..) ) 
-import DmdAnal         ( both )
 import MkId            ( realWorldPrimId, voidArgId, eRROR_CSTRING_ID )
-import TysPrim         ( realWorldStatePrimTy )
 import TysWiredIn      ( tupleCon )
 import Type            ( Type, isUnLiftedType, mkFunTys,
                          splitForAllTys, splitFunTys, splitNewType_maybe, isAlgType
@@ -27,7 +25,7 @@ import Type           ( Type, isUnLiftedType, mkFunTys,
 import Literal         ( Literal(MachStr) )
 import BasicTypes      ( Boxity(..) )
 import Var              ( Var, isId )
-import UniqSupply      ( returnUs, thenUs, getUniqueUs, getUniquesUs, UniqSM )
+import UniqSupply      ( returnUs, thenUs, getUniquesUs, UniqSM )
 import Util            ( zipWithEqual )
 import Outputable
 import List            ( zipWith4 )
index be2a441..4a1e401 100644 (file)
@@ -61,7 +61,6 @@ import Class  ( Class )
 import Id      ( Id, idName, idType, mkUserLocal, mkSysLocal, mkLocalId )
 import PrelInfo        ( isStandardClass, isCcallishClass, isNoDictClass )
 import Name    ( Name, mkMethodOcc, getOccName )
-import NameSet ( NameSet )
 import PprType ( pprPred )     
 import Subst   ( emptyInScopeSet, mkSubst, 
                  substTy, substTyWith, substTheta, mkTyVarSubst, mkTopTyVarSubst
index cdd417f..31cfa28 100644 (file)
@@ -17,15 +17,13 @@ import HsSyn                ( HsBinds(..), Match(..), GRHSs(..), GRHS(..),
                          pprMatch, getMatchLoc, pprMatchContext, isDoExpr,
                          mkMonoBind, nullMonoBinds, collectSigTysFromPats
                        )
-import RnHsSyn         ( RenamedMatch, RenamedGRHSs, RenamedStmt, RenamedPat, RenamedHsType,
-                         RenamedMatchContext, extractHsTyVars )
+import RnHsSyn         ( RenamedMatch, RenamedGRHSs, RenamedStmt, RenamedPat, RenamedMatchContext )
 import TcHsSyn         ( TcMatch, TcGRHSs, TcStmt, TcDictBinds, TypecheckedPat )
 
 import TcMonad
-import TcMonoType      ( kcHsSigTypes, tcAddScopedTyVars, checkSigTyVars, tcHsSigType, UserTypeCtxt(..), sigPatCtxt )
+import TcMonoType      ( tcAddScopedTyVars, checkSigTyVars, tcHsSigType, UserTypeCtxt(..), sigPatCtxt )
 import Inst            ( LIE, isEmptyLIE, plusLIE, emptyLIE, plusLIEs, lieToList )
-import TcEnv           ( TcId, tcLookupLocalIds, tcExtendLocalValEnv, tcExtendGlobalTyVars,
-                         tcInLocalScope )
+import TcEnv           ( TcId, tcLookupLocalIds, tcExtendLocalValEnv, tcExtendGlobalTyVars )
 import TcPat           ( tcPat, tcMonoPatBndr, polyPatSig )
 import TcMType         ( newTyVarTy, unifyFunTy, unifyTauTy )
 import TcType          ( TcType, TcTyVar, tyVarsOfType, isTauTy,  
@@ -36,7 +34,6 @@ import Name           ( Name )
 import TysWiredIn      ( boolTy )
 import Id              ( idType )
 import BasicTypes      ( RecFlag(..) )
-import NameSet
 import VarSet
 import Var             ( Id )
 import Bag
index 28743e2..d613e07 100644 (file)
@@ -44,7 +44,7 @@ import {-# SOURCE #-} TcEnv  ( TcEnv )
 
 import HsLit           ( HsOverLit )
 import RnHsSyn         ( RenamedPat, RenamedArithSeqInfo, RenamedHsExpr )
-import TcType          ( Type, Kind, PredType, ThetaType, TyVarDetails )
+import TcType          ( Type, Kind, TyVarDetails )
 import ErrUtils                ( addShortErrLocLine, addShortWarnLocLine, ErrMsg, Message, WarnMsg )
 
 import Bag             ( Bag, emptyBag, isEmptyBag,
@@ -53,7 +53,6 @@ import Class          ( Class )
 import Name            ( Name )
 import Var             ( Id, TyVar, newMutTyVar, readMutTyVar, writeMutTyVar )
 import VarEnv          ( TidyEnv, emptyTidyEnv )
-import VarSet          ( TyVarSet )
 import UniqSupply      ( UniqSupply, uniqFromSupply, uniqsFromSupply, 
                          splitUniqSupply, mkSplitUniqSupply,
                          UniqSM, initUs_ )
index ca4629a..1ad297c 100644 (file)
@@ -35,7 +35,7 @@ import TcMType                ( newKindVar, tcInstSigTyVars,
                          checkValidType, UserTypeCtxt(..), pprUserTypeCtxt
                        )
 import TcType          ( Type, Kind, SourceType(..), ThetaType, TyVarDetails(..),
-                         TcTyVar, TcTyVarSet, TcType, TcKind, TcThetaType, TcTauType,
+                         TcTyVar, TcTyVarSet, TcKind, TcThetaType, TcTauType,
                          mkTyVarTy, mkTyVarTys, mkFunTy, mkSynTy,
                          tcSplitForAllTys, tcSplitRhoTy, 
                          hoistForAllTys, allDistinctTyVars, zipFunTys, 
@@ -52,11 +52,11 @@ import PprType              ( pprType )
 import Subst           ( mkTopTyVarSubst, substTy )
 import CoreFVs         ( idFreeTyVars )
 import Id              ( mkLocalId, idName, idType )
-import Var             ( Id, Var, TyVar, mkTyVar, tyVarKind, isMutTyVar, mutTyVarDetails )
+import Var             ( Var, TyVar, mkTyVar, tyVarKind, isMutTyVar, mutTyVarDetails )
 import VarEnv
 import VarSet
 import ErrUtils                ( Message )
-import TyCon           ( TyCon, isSynTyCon, tyConArity, tyConKind )
+import TyCon           ( TyCon, isSynTyCon, tyConKind )
 import Class           ( classTyCon )
 import Name            ( Name, getSrcLoc )
 import NameSet
index e0aa172..7aefcac 100644 (file)
@@ -18,7 +18,7 @@ import TcSimplify     ( tcSimplifyToDicts, tcSimplifyInferCheck )
 import TcMType         ( newTyVarTy )
 import TcType          ( tyVarsOfTypes, openTypeKind )
 import TcIfaceSig      ( tcCoreExpr, tcCoreLamBndrs, tcVar, tcDelay )
-import TcMonoType      ( kcHsSigTypes, tcHsSigType, UserTypeCtxt(..), tcAddScopedTyVars )
+import TcMonoType      ( tcHsSigType, UserTypeCtxt(..), tcAddScopedTyVars )
 import TcExpr          ( tcExpr )
 import TcEnv           ( RecTcEnv, tcExtendLocalValEnv, isLocalThing )
 import Rules           ( extendRuleBase )
index 2c79450..96d611f 100644 (file)
@@ -57,7 +57,7 @@ import Pretty         ( Doc, Mode(..), TextDetails(..), fullRender )
 import Panic
 
 import Word            ( Word32 )
-import IO              ( Handle, hPutChar, hPutStr, stderr, stdout )
+import IO              ( Handle, stderr, stdout )
 import Char             ( chr )
 #if __GLASGOW_HASKELL__ < 410
 import Char            ( ord, isDigit )
index 1aedc7b..60686bb 100644 (file)
@@ -69,31 +69,32 @@ module StringBuffer
 
 #include "HsVersions.h"
 
-import GlaExts
+
 #if __GLASGOW_HASKELL__ < 411
 import PrelAddr        ( Addr(..) )
+import Panic           ( panic )
 #else
 import Addr            ( Addr(..) )
+import Ptr             ( Ptr(..) )
 #endif
-import Foreign
+
+#if __GLASGOW_HASKELL__ >= 501
+import PrelIO          ( hGetcBuffered )
+#else
 import Char            ( chr )
-import Panic           ( panic )
+#endif
+
+import GlaExts
+import Foreign
 
 import IO              ( openFile  )
 import IOExts          ( slurpFile )
 import PrelIOBase
 import PrelHandle
 import Addr
-#if __GLASGOW_HASKELL__ >= 411
-import Ptr             ( Ptr(..) )
-#endif
 
 import PrelPack                ( unpackCStringBA )
 
-#if __GLASGOW_HASKELL__ >= 501
-import PrelIO          ( hGetcBuffered )
-#endif
-
 import Exception       ( bracket )
 import PrimPacked
 import FastString