From a5ded1f8e90fd3dfc0cb05767923bcb0dd7392af Mon Sep 17 00:00:00 2001 From: simonpj Date: Mon, 25 Jun 2001 14:36:06 +0000 Subject: [PATCH] [project @ 2001-06-25 14:36:04 by simonpj] Import wibbles --- ghc/compiler/codeGen/CgCon.lhs | 1 - ghc/compiler/codeGen/CgTailCall.lhs | 5 ++--- ghc/compiler/codeGen/SMRep.lhs | 1 - ghc/compiler/coreSyn/MkExternalCore.lhs | 4 ---- ghc/compiler/cprAnalysis/CprAnalyse.lhs | 6 +----- ghc/compiler/deSugar/DsCCall.lhs | 3 +-- ghc/compiler/deSugar/DsExpr.lhs | 6 ++---- ghc/compiler/hsSyn/HsExpr.lhs | 1 - ghc/compiler/hsSyn/HsTypes.lhs | 2 +- ghc/compiler/main/SysTools.lhs | 10 ++++------ ghc/compiler/parser/Lex.lhs | 2 +- ghc/compiler/parser/RdrHsSyn.lhs | 1 - ghc/compiler/simplCore/CSE.lhs | 2 +- ghc/compiler/simplCore/FloatIn.lhs | 2 +- ghc/compiler/simplCore/LiberateCase.lhs | 3 +-- ghc/compiler/simplCore/SimplUtils.lhs | 4 ++-- ghc/compiler/specialise/Rules.lhs | 1 - ghc/compiler/specialise/Specialise.lhs | 10 +--------- ghc/compiler/stranal/SaAbsInt.lhs | 1 - ghc/compiler/stranal/WorkWrap.lhs | 2 +- ghc/compiler/stranal/WwLib.lhs | 2 +- ghc/compiler/typecheck/TcExpr.lhs | 1 - ghc/compiler/typecheck/TcMType.lhs | 11 +++-------- ghc/compiler/typecheck/TcMatches.lhs | 2 +- ghc/compiler/typecheck/TcModule.lhs | 1 - ghc/compiler/typecheck/TcRules.lhs | 5 ++--- ghc/compiler/typecheck/TcTyClsDecls.lhs | 14 +++++--------- ghc/compiler/typecheck/TcTyDecls.lhs | 11 +++-------- ghc/compiler/typecheck/TcType.lhs | 10 ++++------ ghc/compiler/types/Generics.lhs | 5 ++--- ghc/compiler/types/Type.lhs | 17 +++++++---------- 31 files changed, 47 insertions(+), 99 deletions(-) diff --git a/ghc/compiler/codeGen/CgCon.lhs b/ghc/compiler/codeGen/CgCon.lhs index e09c085..aa2aec3 100644 --- a/ghc/compiler/codeGen/CgCon.lhs +++ b/ghc/compiler/codeGen/CgCon.lhs @@ -75,7 +75,6 @@ cgTopRhsCon id con args name = idName id closure_label = mkClosureLabel name lf_info = mkConLFInfo con - cg_id_info = stableAmodeIdInfo id (CLbl closure_label PtrRep) lf_info in ( diff --git a/ghc/compiler/codeGen/CgTailCall.lhs b/ghc/compiler/codeGen/CgTailCall.lhs index 06e7ff5..acfc3ae 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.29 2000/12/06 13:19:49 simonmar Exp $ +% $Id: CgTailCall.lhs,v 1.30 2001/06/25 14:36:04 simonpj Exp $ % %******************************************************** %* * @@ -39,8 +39,7 @@ import CgRetConv ( dataReturnConvPrim, import CgStackery ( mkTaggedStkAmodes, adjustStackHW ) import CgUsages ( getSpRelOffset, adjustSpAndHp ) import CgUpdate ( pushSeqFrame ) -import CLabel ( mkUpdInfoLabel, mkRtsPrimOpLabel, - mkBlackHoleInfoTableLabel ) +import CLabel ( mkUpdInfoLabel, mkRtsPrimOpLabel ) import ClosureInfo ( nodeMustPointToIt, getEntryConvention, EntryConvention(..), LambdaFormInfo ) diff --git a/ghc/compiler/codeGen/SMRep.lhs b/ghc/compiler/codeGen/SMRep.lhs index d2bb4f7..e2698c0 100644 --- a/ghc/compiler/codeGen/SMRep.lhs +++ b/ghc/compiler/codeGen/SMRep.lhs @@ -49,7 +49,6 @@ module SMRep ( #include "HsVersions.h" import CmdLineOpts -import AbsCSyn ( Liveness(..) ) import Constants ( sTD_HDR_SIZE, pROF_HDR_SIZE, gRAN_HDR_SIZE, tICKY_HDR_SIZE, aRR_WORDS_HDR_SIZE, aRR_PTRS_HDR_SIZE, diff --git a/ghc/compiler/coreSyn/MkExternalCore.lhs b/ghc/compiler/coreSyn/MkExternalCore.lhs index 933bd17..b8e17cc 100644 --- a/ghc/compiler/coreSyn/MkExternalCore.lhs +++ b/ghc/compiler/coreSyn/MkExternalCore.lhs @@ -11,7 +11,6 @@ module MkExternalCore ( import qualified ExternalCore as C import Char -import Ratio import Module import CoreSyn import HscTypes @@ -22,13 +21,10 @@ import DataCon import CoreSyn import Var import IdInfo -import NameEnv import Literal import Name import CostCentre import Outputable -import PrimOp -import Class import ForeignCall import PprExternalCore import CmdLineOpts diff --git a/ghc/compiler/cprAnalysis/CprAnalyse.lhs b/ghc/compiler/cprAnalysis/CprAnalyse.lhs index 760d142..81b2f9e 100644 --- a/ghc/compiler/cprAnalysis/CprAnalyse.lhs +++ b/ghc/compiler/cprAnalysis/CprAnalyse.lhs @@ -6,7 +6,7 @@ module CprAnalyse ( cprAnalyse ) where #include "HsVersions.h" -import CmdLineOpts ( DynFlags, DynFlag(..), dopt ) +import CmdLineOpts ( DynFlags, DynFlag(..) ) import CoreLint ( showPass, endPass ) import CoreSyn import CoreUtils ( exprIsValue ) @@ -91,10 +91,6 @@ data AbsVal = Top -- Not a constructed product -- we could use appropriate Tuple Vals deriving (Eq,Show) -isFun :: AbsVal -> Bool -isFun (Fun _) = True -isFun _ = False - -- For pretty debugging instance Outputable AbsVal where ppr Top = ptext SLIT("Top") diff --git a/ghc/compiler/deSugar/DsCCall.lhs b/ghc/compiler/deSugar/DsCCall.lhs index e9f3dd5..b7c6064 100644 --- a/ghc/compiler/deSugar/DsCCall.lhs +++ b/ghc/compiler/deSugar/DsCCall.lhs @@ -18,7 +18,7 @@ import CoreSyn import DsMonad -import CoreUtils ( exprType, mkCoerce ) +import CoreUtils ( exprType ) import Id ( Id, mkWildId, idType ) import MkId ( mkFCallId, realWorldPrimId, mkPrimOpId ) import Maybes ( maybeToBool ) @@ -31,7 +31,6 @@ import TcType ( isUnLiftedType, mkFunTys, tcEqType, isBoolTy, isUnitTy, Type ) -import Type ( repType ) import PrimOp ( PrimOp(TouchOp) ) import TysPrim ( realWorldStatePrimTy, byteArrayPrimTyCon, mutableByteArrayPrimTyCon, diff --git a/ghc/compiler/deSugar/DsExpr.lhs b/ghc/compiler/deSugar/DsExpr.lhs index 2ce9440..997d565 100644 --- a/ghc/compiler/deSugar/DsExpr.lhs +++ b/ghc/compiler/deSugar/DsExpr.lhs @@ -13,11 +13,9 @@ import HsSyn ( failureFreePat, HsExpr(..), OutPat(..), HsLit(..), ArithSeqInfo(..), Stmt(..), HsMatchContext(..), HsDoContext(..), Match(..), HsBinds(..), MonoBinds(..), - mkSimpleMatch, isDoExpr - ) -import TcHsSyn ( TypecheckedHsExpr, TypecheckedHsBinds, - TypecheckedStmt, TypecheckedMatchContext + mkSimpleMatch ) +import TcHsSyn ( TypecheckedHsExpr, TypecheckedHsBinds, TypecheckedStmt ) import TcType ( tcSplitAppTy, tcSplitFunTys, tcSplitTyConApp_maybe, tcTyConAppArgs, isIntegerTy, tcSplitTyConApp, isUnLiftedType, Type ) import CoreSyn diff --git a/ghc/compiler/hsSyn/HsExpr.lhs b/ghc/compiler/hsSyn/HsExpr.lhs index 60a1b83..d036547 100644 --- a/ghc/compiler/hsSyn/HsExpr.lhs +++ b/ghc/compiler/hsSyn/HsExpr.lhs @@ -17,7 +17,6 @@ import HsImpExp ( isOperator ) -- others: import ForeignCall ( Safety ) -import Name ( Name ) import Outputable import PprType ( pprParendType ) import Type ( Type ) diff --git a/ghc/compiler/hsSyn/HsTypes.lhs b/ghc/compiler/hsSyn/HsTypes.lhs index 04a6192..f5156ae 100644 --- a/ghc/compiler/hsSyn/HsTypes.lhs +++ b/ghc/compiler/hsSyn/HsTypes.lhs @@ -27,7 +27,7 @@ module HsTypes ( #include "HsVersions.h" import Class ( FunDep ) -import TcType ( Type, Kind, ThetaType, SourceType(..), PredType, +import TcType ( Type, Kind, ThetaType, SourceType(..), tcSplitSigmaTy, liftedTypeKind, eqKind, tcEqType ) import TypeRep ( Type(..), TyNote(..) ) -- toHsType sees the representation diff --git a/ghc/compiler/main/SysTools.lhs b/ghc/compiler/main/SysTools.lhs index 05514bb..66c36c4 100644 --- a/ghc/compiler/main/SysTools.lhs +++ b/ghc/compiler/main/SysTools.lhs @@ -49,8 +49,7 @@ import Panic ( progName, GhcException(..) ) import Util ( global ) import CmdLineOpts ( dynFlag, verbosity ) -import List ( isPrefixOf ) -import Exception ( throw, throwDyn, catchAllIO ) +import Exception ( throwDyn, catchAllIO ) import IO ( hPutStr, hPutChar, hPutStrLn, hFlush, stderr ) import Directory ( doesFileExist, removeFile ) import IOExts ( IORef, readIORef, writeIORef ) @@ -69,7 +68,8 @@ import Int #if !defined(mingw32_TARGET_OS) import qualified Posix #else -import Addr ( nullAddr ) +import Addr ( nullAddr ) +import List ( isPrefixOf ) #endif #include "HsVersions.h" @@ -565,9 +565,8 @@ interpreted a command line 'foo\baz' as 'foobaz'. ----------------------------------------------------------------------------- -- Convert filepath into MSDOS form. -dosifyPath :: String -> String dosifyPaths :: [String] -> [String] --- dosifyPath does two things +-- dosifyPaths does two things -- a) change '/' to '\' -- b) remove initial '/cygdrive/' @@ -595,7 +594,6 @@ dosifyPath stuff #else --------------------- Unix version --------------------- -dosifyPath p = p dosifyPaths ps = ps unDosifyPath xs = subst '\\' '/' xs -------------------------------------------------------- diff --git a/ghc/compiler/parser/Lex.lhs b/ghc/compiler/parser/Lex.lhs index 7cd811d..be83c11 100644 --- a/ghc/compiler/parser/Lex.lhs +++ b/ghc/compiler/parser/Lex.lhs @@ -42,7 +42,7 @@ import CmdLineOpts ( opt_HiVersion, opt_NoHiCheck ) import ForeignCall ( Safety(..) ) import Demand ( Demand(..) {- instance Read -} ) import UniqFM ( listToUFM, lookupUFM ) -import BasicTypes ( NewOrData(..), Boxity(..) ) +import BasicTypes ( Boxity(..) ) import SrcLoc ( SrcLoc, incSrcLine, srcLocFile, srcLocLine, replaceSrcLine, mkSrcLoc ) diff --git a/ghc/compiler/parser/RdrHsSyn.lhs b/ghc/compiler/parser/RdrHsSyn.lhs index a5c7f3f..8cc3afe 100644 --- a/ghc/compiler/parser/RdrHsSyn.lhs +++ b/ghc/compiler/parser/RdrHsSyn.lhs @@ -61,7 +61,6 @@ module RdrHsSyn ( #include "HsVersions.h" import HsSyn -- Lots of it -import HsPat ( collectSigTysFromPats ) import OccName ( mkClassTyConOcc, mkClassDataConOcc, mkWorkerOcc, mkSuperDictSelOcc, mkDefaultMethodOcc, mkGenOcc1, mkGenOcc2, diff --git a/ghc/compiler/simplCore/CSE.lhs b/ghc/compiler/simplCore/CSE.lhs index 041fdfb..310e36e 100644 --- a/ghc/compiler/simplCore/CSE.lhs +++ b/ghc/compiler/simplCore/CSE.lhs @@ -10,7 +10,7 @@ module CSE ( #include "HsVersions.h" -import CmdLineOpts ( DynFlag(..), DynFlags, dopt ) +import CmdLineOpts ( DynFlag(..), DynFlags ) import Id ( Id, idType ) import CoreUtils ( hashExpr, cheapEqExpr, exprIsBig, mkAltExpr ) import DataCon ( isUnboxedTupleCon ) diff --git a/ghc/compiler/simplCore/FloatIn.lhs b/ghc/compiler/simplCore/FloatIn.lhs index ec02ec0..72d7649 100644 --- a/ghc/compiler/simplCore/FloatIn.lhs +++ b/ghc/compiler/simplCore/FloatIn.lhs @@ -16,7 +16,7 @@ module FloatIn ( floatInwards ) where #include "HsVersions.h" -import CmdLineOpts ( DynFlags, DynFlag(..), dopt ) +import CmdLineOpts ( DynFlags, DynFlag(..) ) import CoreSyn import CoreUtils ( exprIsValue, exprIsDupable ) import CoreLint ( showPass, endPass ) diff --git a/ghc/compiler/simplCore/LiberateCase.lhs b/ghc/compiler/simplCore/LiberateCase.lhs index d9ba473..15d256f 100644 --- a/ghc/compiler/simplCore/LiberateCase.lhs +++ b/ghc/compiler/simplCore/LiberateCase.lhs @@ -8,14 +8,13 @@ module LiberateCase ( liberateCase ) where #include "HsVersions.h" -import CmdLineOpts ( DynFlags, DynFlag(..), dopt, opt_LiberateCaseThreshold ) +import CmdLineOpts ( DynFlags, DynFlag(..), opt_LiberateCaseThreshold ) import CoreLint ( showPass, endPass ) import CoreSyn import CoreUnfold ( couldBeSmallEnoughToInline ) import Var ( Id ) import VarEnv import UniqFM ( ufmToList ) -import Maybes import Outputable \end{code} diff --git a/ghc/compiler/simplCore/SimplUtils.lhs b/ghc/compiler/simplCore/SimplUtils.lhs index d40f151..0f0cb76 100644 --- a/ghc/compiler/simplCore/SimplUtils.lhs +++ b/ghc/compiler/simplCore/SimplUtils.lhs @@ -19,7 +19,7 @@ module SimplUtils ( #include "HsVersions.h" import CmdLineOpts ( switchIsOn, SimplifierSwitch(..), - opt_SimplDoLambdaEtaExpansion, opt_SimplCaseMerge, opt_DictsStrict, + opt_SimplDoLambdaEtaExpansion, opt_SimplCaseMerge, opt_UF_UpdateInPlace ) import CoreSyn @@ -38,7 +38,7 @@ import Maybes ( maybeToBool, catMaybes ) import Name ( setNameUnique ) import Demand ( isStrict ) import SimplMonad -import Type ( Type, mkForAllTys, seqType, repType, +import Type ( Type, mkForAllTys, seqType, splitTyConApp_maybe, tyConAppArgs, mkTyVarTys, isUnLiftedType, splitRepFunTys diff --git a/ghc/compiler/specialise/Rules.lhs b/ghc/compiler/specialise/Rules.lhs index 591e4db..4535aab 100644 --- a/ghc/compiler/specialise/Rules.lhs +++ b/ghc/compiler/specialise/Rules.lhs @@ -31,7 +31,6 @@ import VarSet import VarEnv import TcType ( mkTyVarTy ) import qualified TcType ( match ) -import TypeRep ( Type(..) ) -- Can see type representation for matching import Outputable import Maybe ( isJust, isNothing, fromMaybe ) diff --git a/ghc/compiler/specialise/Specialise.lhs b/ghc/compiler/specialise/Specialise.lhs index 52eae04..d950200 100644 --- a/ghc/compiler/specialise/Specialise.lhs +++ b/ghc/compiler/specialise/Specialise.lhs @@ -9,9 +9,7 @@ module Specialise ( specProgram ) where #include "HsVersions.h" import CmdLineOpts ( DynFlags, DynFlag(..) ) -import Id ( Id, idName, idType, mkUserLocal, - idSpecialisation, modifyIdInfo - ) +import Id ( Id, idName, idType, mkUserLocal, idSpecialisation ) import TcType ( Type, mkTyVarTy, tcSplitSigmaTy, tyVarsOfTypes, tyVarsOfTheta, mkForAllTys, tcCmpType @@ -1098,12 +1096,6 @@ splitUDs bndrs uds@(MkUD {dict_binds = orig_dbs, %************************************************************************ \begin{code} -lookupId:: IdEnv Id -> Id -> Id -lookupId env id = case lookupVarEnv env id of - Nothing -> id - Just id' -> id' - ----------------------------------------- type SpecM a = UniqSM a thenSM = thenUs diff --git a/ghc/compiler/stranal/SaAbsInt.lhs b/ghc/compiler/stranal/SaAbsInt.lhs index faa2346..e413b48 100644 --- a/ghc/compiler/stranal/SaAbsInt.lhs +++ b/ghc/compiler/stranal/SaAbsInt.lhs @@ -26,7 +26,6 @@ import Demand ( Demand(..), wwPrim, wwStrict, wwUnpack, wwLazy, ) import SaLib import TyCon ( isProductTyCon, isRecursiveTyCon ) -import BasicTypes ( NewOrData(..) ) import Type ( splitTyConApp_maybe, isUnLiftedType, Type ) import TyCon ( tyConUnique ) diff --git a/ghc/compiler/stranal/WorkWrap.lhs b/ghc/compiler/stranal/WorkWrap.lhs index 58e294d..796488a 100644 --- a/ghc/compiler/stranal/WorkWrap.lhs +++ b/ghc/compiler/stranal/WorkWrap.lhs @@ -15,7 +15,7 @@ import CoreUtils ( exprType ) import Id ( Id, idType, idStrictness, idArity, isOneShotLambda, setIdStrictness, idInlinePragma, mkWorkerId, setIdWorkerInfo, idCprInfo, setInlinePragma ) -import Type ( Type, splitForAllTys, splitFunTys ) +import Type ( Type ) import IdInfo ( mkStrictnessInfo, noStrictnessInfo, StrictnessInfo(..), CprInfo(..), InlinePragInfo(..), isNeverInlinePrag, WorkerInfo(..) diff --git a/ghc/compiler/stranal/WwLib.lhs b/ghc/compiler/stranal/WwLib.lhs index 96ba8f3..55a269b 100644 --- a/ghc/compiler/stranal/WwLib.lhs +++ b/ghc/compiler/stranal/WwLib.lhs @@ -26,7 +26,7 @@ import TysWiredIn ( tupleCon ) import Type ( Type, isUnLiftedType, mkFunTys, splitForAllTys, splitFunTys, isAlgType ) -import BasicTypes ( NewOrData(..), Arity, Boxity(..) ) +import BasicTypes ( Arity, Boxity(..) ) import Var ( Var, isId ) import UniqSupply ( returnUs, thenUs, getUniqueUs, getUniquesUs, UniqSM ) import Util ( zipWithEqual ) diff --git a/ghc/compiler/typecheck/TcExpr.lhs b/ghc/compiler/typecheck/TcExpr.lhs index e50f0d8..1216001 100644 --- a/ghc/compiler/typecheck/TcExpr.lhs +++ b/ghc/compiler/typecheck/TcExpr.lhs @@ -63,7 +63,6 @@ import PrelNames ( cCallableClassName, thenMName, failMName, returnMName, ioTyConName ) import Outputable -import Maybes ( maybeToBool ) import ListSetOps ( minusList ) import Util import CmdLineOpts diff --git a/ghc/compiler/typecheck/TcMType.lhs b/ghc/compiler/typecheck/TcMType.lhs index 7b279fb..f11634e 100644 --- a/ghc/compiler/typecheck/TcMType.lhs +++ b/ghc/compiler/typecheck/TcMType.lhs @@ -47,15 +47,12 @@ module TcMType ( -- friends: import TypeRep ( Type(..), Kind, TyNote(..) ) -- friend import Type -- Lots and lots -import TcType ( SigmaType, RhoType, tcEqType, +import TcType ( tcEqType, tcSplitRhoTy, tcSplitPredTy_maybe, tcSplitAppTy_maybe, tcSplitTyConApp_maybe, tcSplitFunTy_maybe ) -import PprType ( pprType ) import Subst ( Subst, mkTopTyVarSubst, substTy ) -import TyCon ( TyCon, mkPrimTyCon, isNewTyCon, isSynTyCon, isTupleTyCon, - tyConArity, tupleTyConBoxity - ) +import TyCon ( TyCon, mkPrimTyCon, isTupleTyCon, tyConArity, tupleTyConBoxity ) import PrimRep ( PrimRep(VoidRep) ) import Var ( TyVar, varName, tyVarKind, tyVarName, isTyVar, mkTyVar, isMutTyVar, isSigTyVar ) @@ -67,11 +64,9 @@ import TysWiredIn ( voidTy, listTyCon, mkListTy, mkTupleTy ) import Name ( Name, NamedThing(..), setNameUnique, mkSysLocalName, mkLocalName, mkDerivedTyConOcc, isSystemName ) -import PrelNames ( floatTyConKey, doubleTyConKey, foreignPtrTyConKey, - integerTyConKey, intTyConKey, addrTyConKey ) import VarSet import BasicTypes ( Boxity, Arity, isBoxed ) -import Unique ( Unique, Uniquable(..) ) +import Unique ( Uniquable(..) ) import SrcLoc ( noSrcLoc ) import Util ( nOfThem ) import Outputable diff --git a/ghc/compiler/typecheck/TcMatches.lhs b/ghc/compiler/typecheck/TcMatches.lhs index d63110a..94c406e 100644 --- a/ghc/compiler/typecheck/TcMatches.lhs +++ b/ghc/compiler/typecheck/TcMatches.lhs @@ -19,7 +19,7 @@ import HsSyn ( HsBinds(..), Match(..), GRHSs(..), GRHS(..), ) import RnHsSyn ( RenamedMatch, RenamedGRHSs, RenamedStmt, RenamedPat, RenamedHsType, RenamedMatchContext, extractHsTyVars ) -import TcHsSyn ( TcMatch, TcGRHSs, TcStmt, TcDictBinds, TypecheckedPat, TypecheckedMatchContext ) +import TcHsSyn ( TcMatch, TcGRHSs, TcStmt, TcDictBinds, TypecheckedPat ) import TcMonad import TcMonoType ( kcHsSigTypes, tcScopedTyVars, checkSigTyVars, tcHsSigType, sigPatCtxt ) diff --git a/ghc/compiler/typecheck/TcModule.lhs b/ghc/compiler/typecheck/TcModule.lhs index cdcd01d..3ebbc7e 100644 --- a/ghc/compiler/typecheck/TcModule.lhs +++ b/ghc/compiler/typecheck/TcModule.lhs @@ -73,7 +73,6 @@ import HscTypes ( PersistentCompilerState(..), HomeSymbolTable, TyThing(..), implicitTyThingIds, mkTypeEnv ) -import VarSet \end{code} diff --git a/ghc/compiler/typecheck/TcRules.lhs b/ghc/compiler/typecheck/TcRules.lhs index a87a661..b048f86 100644 --- a/ghc/compiler/typecheck/TcRules.lhs +++ b/ghc/compiler/typecheck/TcRules.lhs @@ -18,14 +18,13 @@ import TcSimplify ( tcSimplifyToDicts, tcSimplifyInferCheck ) import TcMType ( newTyVarTy ) import TcType ( tyVarsOfTypes, openTypeKind ) import TcIfaceSig ( tcCoreExpr, tcCoreLamBndrs, tcVar ) -import TcMonoType ( kcHsSigTypes, tcHsSigType, tcScopedTyVars, checkSigTyVars ) +import TcMonoType ( kcHsSigTypes, tcHsSigType, tcScopedTyVars ) import TcExpr ( tcExpr ) -import TcEnv ( tcExtendLocalValEnv, tcExtendTyVarEnv, isLocalThing ) +import TcEnv ( tcExtendLocalValEnv, isLocalThing ) import Rules ( extendRuleBase ) import Inst ( LIE, plusLIEs, instToId ) import Id ( idName, idType, mkLocalId ) import Module ( Module ) -import VarSet import List ( partition ) import Outputable \end{code} diff --git a/ghc/compiler/typecheck/TcTyClsDecls.lhs b/ghc/compiler/typecheck/TcTyClsDecls.lhs index fcf1636..382ce38 100644 --- a/ghc/compiler/typecheck/TcTyClsDecls.lhs +++ b/ghc/compiler/typecheck/TcTyClsDecls.lhs @@ -28,19 +28,15 @@ import TcClassDcl ( tcClassDecl1 ) import TcInstDcls ( tcAddDeclCtxt ) import TcMonoType ( kcHsTyVars, kcHsType, kcHsLiftedSigType, kcHsContext, mkTyClTyVars ) import TcMType ( unifyKind, newKindVar, zonkKindEnv ) -import TcType ( tcSplitTyConApp_maybe, - Type, Kind, mkArrowKind, liftedTypeKind, zipFunTys - ) -import Subst ( mkTyVarSubst, substTy ) +import TcType ( Type, Kind, mkArrowKind, liftedTypeKind, zipFunTys ) import Variance ( calcTyConArgVrcs ) import Class ( Class, mkClass, classTyCon ) import TyCon ( TyCon, ArgVrcs, AlgTyConFlavour(..), - tyConName, tyConKind, tyConTyVars, tyConArity, tyConDataCons, - mkSynTyCon, mkAlgTyCon, mkClassTyCon, mkForeignTyCon, isNewTyCon, + tyConKind, tyConDataCons, + mkSynTyCon, mkAlgTyCon, mkClassTyCon, mkForeignTyCon, isRecursiveTyCon ) -import TysWiredIn ( unitTy ) -import DataCon ( isNullaryDataCon, dataConOrigArgTys ) -import Var ( varName, varType ) +import DataCon ( dataConOrigArgTys ) +import Var ( varName ) import FiniteMap import Digraph ( stronglyConnComp, SCC(..) ) import Name ( Name, getSrcLoc, isTyVarName ) diff --git a/ghc/compiler/typecheck/TcTyDecls.lhs b/ghc/compiler/typecheck/TcTyDecls.lhs index dfd86ed..9ab5661 100644 --- a/ghc/compiler/typecheck/TcTyDecls.lhs +++ b/ghc/compiler/typecheck/TcTyDecls.lhs @@ -21,21 +21,16 @@ import TcEnv ( tcExtendTyVarEnv, tcLookupTyCon, tcLookupRecId, TyThingDetails(..), RecTcEnv ) -import TcType ( tcSplitTyConApp_maybe, tcEqType, - tyVarsOfTypes, tyVarsOfPred, - mkTyConApp, mkTyVarTys, mkForAllTys, - Type, ThetaType - ) +import TcType ( tcEqType, tyVarsOfTypes, tyVarsOfPred, Type, ThetaType ) import TcMonad -import DataCon ( DataCon, mkDataCon, dataConFieldLabels, dataConRepType, - isNullaryDataCon, dataConOrigArgTys ) +import DataCon ( DataCon, mkDataCon, dataConFieldLabels ) import MkId ( mkDataConId, mkDataConWrapId, mkRecordSelId ) import FieldLabel import Var ( TyVar ) import Name ( Name, NamedThing(..) ) import Outputable -import TyCon ( TyCon, AlgTyConFlavour(..), tyConTyVars ) +import TyCon ( TyCon, tyConTyVars ) import VarSet ( intersectVarSet, isEmptyVarSet ) import PrelNames ( unpackCStringName, unpackCStringUtf8Name ) import ListSetOps ( equivClasses ) diff --git a/ghc/compiler/typecheck/TcType.lhs b/ghc/compiler/typecheck/TcType.lhs index d6420b2..d9c6387 100644 --- a/ghc/compiler/typecheck/TcType.lhs +++ b/ghc/compiler/typecheck/TcType.lhs @@ -90,22 +90,20 @@ import TypeRep ( Type(..), TyNote(..) ) -- friend import Type -- Lots and lots import TyCon ( TyCon, isPrimTyCon, tyConArity, isNewTyCon ) import Class ( classTyCon, classHasFDs, Class ) -import Var ( TyVar, tyVarName, isTyVar, tyVarKind, mkTyVar ) +import Var ( TyVar, tyVarKind ) import VarEnv import VarSet -- others: import CmdLineOpts ( opt_DictsStrict ) -import Name ( Name, NamedThing(..), setNameUnique, mkSysLocalName, - mkLocalName, mkDerivedTyConOcc - ) +import Name ( Name, NamedThing(..), mkLocalName ) import OccName ( OccName, mkDictOcc ) import NameSet import PrelNames ( floatTyConKey, doubleTyConKey, foreignPtrTyConKey, integerTyConKey, intTyConKey, addrTyConKey, boolTyConKey ) import Unique ( Unique, Uniquable(..), mkTupleTyConUnique ) -import SrcLoc ( SrcLoc, noSrcLoc ) -import Util ( nOfThem, cmpList, thenCmp ) +import SrcLoc ( SrcLoc ) +import Util ( cmpList, thenCmp ) import Maybes ( maybeToBool, expectJust ) import BasicTypes ( Boxity(..) ) import Outputable diff --git a/ghc/compiler/types/Generics.lhs b/ghc/compiler/types/Generics.lhs index b14ad1b..41a5660 100644 --- a/ghc/compiler/types/Generics.lhs +++ b/ghc/compiler/types/Generics.lhs @@ -7,7 +7,7 @@ module Generics ( mkTyConGenInfo, mkGenericRhs, import RnHsSyn ( RenamedHsExpr ) import HsSyn ( HsExpr(..), InPat(..), mkSimpleMatch ) -import Type ( Type, isUnLiftedType, applyTys, tyVarsOfType, tyVarsOfTypes, +import Type ( Type, isUnLiftedType, tyVarsOfType, tyVarsOfTypes, mkTyVarTys, mkForAllTys, mkTyConApp, mkFunTy, isTyVarTy, getTyVar_maybe, funTyCon @@ -19,7 +19,7 @@ import TyCon ( TyCon, tyConTyVars, tyConDataConsIfAvailable, tyConGenInfo, isNewTyCon, newTyConRep, isBoxedTupleTyCon ) import Name ( Name, mkSysLocalName ) -import CoreSyn ( mkLams, Expr(..), CoreExpr, AltCon(..), Note(..), +import CoreSyn ( mkLams, Expr(..), CoreExpr, AltCon(..), mkConApp, Alt, mkTyApps, mkVarApps ) import BasicTypes ( EP(..), Boxity(..) ) import Var ( TyVar ) @@ -36,7 +36,6 @@ import CoreUnfold ( mkTopUnfolding ) import Unique ( mkBuiltinUnique ) import SrcLoc ( builtinSrcLoc ) -import Maybes ( expectJust ) import Outputable #include "HsVersions.h" diff --git a/ghc/compiler/types/Type.lhs b/ghc/compiler/types/Type.lhs index b782b19..3ddb287 100644 --- a/ghc/compiler/types/Type.lhs +++ b/ghc/compiler/types/Type.lhs @@ -84,7 +84,6 @@ import TypeRep -- Other imports: -import {-# SOURCE #-} DataCon( DataCon ) import {-# SOURCE #-} PprType( pprType ) -- Only called in debug messages import {-# SOURCE #-} Subst ( mkTyVarSubst, substTy ) @@ -93,24 +92,22 @@ import Var ( Var, TyVar, tyVarKind, tyVarName, setTyVarName ) import VarEnv import VarSet -import OccName ( mkDictOcc ) -import Name ( Name, NamedThing(..), OccName, mkLocalName, tidyOccName ) -import NameSet +import Name ( NamedThing(..), mkLocalName, tidyOccName ) import Class ( classTyCon ) import TyCon ( TyCon, isRecursiveTyCon, isUnboxedTupleTyCon, isUnLiftedTyCon, isFunTyCon, isNewTyCon, newTyConRep, - isAlgTyCon, isSynTyCon, tyConArity, tyConTyVars, - tyConKind, tyConDataCons, getSynTyConDefn, - tyConPrimRep, isPrimTyCon + isAlgTyCon, isSynTyCon, tyConArity, + tyConKind, getSynTyConDefn, + tyConPrimRep, ) -- others import Maybes ( maybeToBool ) -import SrcLoc ( SrcLoc, noSrcLoc ) +import SrcLoc ( noSrcLoc ) import PrimRep ( PrimRep(..) ) -import Unique ( Unique, Uniquable(..) ) -import Util ( mapAccumL, seqList, thenCmp ) +import Unique ( Uniquable(..) ) +import Util ( mapAccumL, seqList ) import Outputable import UniqSet ( sizeUniqSet ) -- Should come via VarSet \end{code} -- 1.7.10.4