From: simonpj Date: Mon, 27 Mar 2000 16:22:11 +0000 (+0000) Subject: [project @ 2000-03-27 16:22:09 by simonpj] X-Git-Tag: Approximately_9120_patches~4896 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=783e505e2d884f94d30ec8074e590507f2561c49 [project @ 2000-03-27 16:22:09 by simonpj] Fix a bug in import listing in interface files that meant we lost track of interface files. This fixes the problem that led Sven to add lots of import PprType() decls. I've removed them all again! --- diff --git a/ghc/compiler/codeGen/CgCase.lhs b/ghc/compiler/codeGen/CgCase.lhs index 8bf74fa..0bc6508 100644 --- a/ghc/compiler/codeGen/CgCase.lhs +++ b/ghc/compiler/codeGen/CgCase.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % -% $Id: CgCase.lhs,v 1.39 2000/03/25 12:38:40 panne Exp $ +% $Id: CgCase.lhs,v 1.40 2000/03/27 16:22:09 simonpj Exp $ % %******************************************************** %* * @@ -62,7 +62,6 @@ import TyCon ( TyCon, isEnumerationTyCon, isUnboxedTupleTyCon, tyConDataCons, tyConFamilySize ) import Type ( Type, typePrimRep, splitAlgTyConApp, splitTyConApp_maybe, repType ) -import PprType ( {- instance Outputable Type -} ) import Unique ( Unique, Uniquable(..), mkPseudoUnique1 ) import Maybes ( maybeToBool ) import Util diff --git a/ghc/compiler/codeGen/CgExpr.lhs b/ghc/compiler/codeGen/CgExpr.lhs index 9c8dfd3..d30731f 100644 --- a/ghc/compiler/codeGen/CgExpr.lhs +++ b/ghc/compiler/codeGen/CgExpr.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % -% $Id: CgExpr.lhs,v 1.32 2000/03/25 12:38:40 panne Exp $ +% $Id: CgExpr.lhs,v 1.33 2000/03/27 16:22:09 simonpj Exp $ % %******************************************************** %* * @@ -48,7 +48,6 @@ import PrimRep ( getPrimRepSize, PrimRep(..), isFollowableRep ) import TyCon ( maybeTyConSingleCon, isUnboxedTupleTyCon, isEnumerationTyCon ) import Type ( Type, typePrimRep, splitTyConApp_maybe, repType ) -import PprType ( {- instance Outputable Type -} ) import Maybes ( assocMaybe, maybeToBool ) import Unique ( mkBuiltinUnique ) import BasicTypes ( TopLevelFlag(..), RecFlag(..) ) diff --git a/ghc/compiler/coreSyn/CoreLint.lhs b/ghc/compiler/coreSyn/CoreLint.lhs index 002d829..02d6e87 100644 --- a/ghc/compiler/coreSyn/CoreLint.lhs +++ b/ghc/compiler/coreSyn/CoreLint.lhs @@ -40,7 +40,6 @@ import Type ( Type, Kind, tyVarsOfType, isUnboxedTupleType, hasMoreBoxityInfo ) -import PprType ( {- instance Outputable Type -} ) import TyCon ( TyCon, isPrimTyCon, tyConDataCons ) import BasicTypes ( RecFlag(..), isNonRec ) import Outputable diff --git a/ghc/compiler/deSugar/DsCCall.lhs b/ghc/compiler/deSugar/DsCCall.lhs index 7752c42..35722fa 100644 --- a/ghc/compiler/deSugar/DsCCall.lhs +++ b/ghc/compiler/deSugar/DsCCall.lhs @@ -33,7 +33,6 @@ import CallConv import Type ( isUnLiftedType, splitAlgTyConApp_maybe, mkFunTys, splitTyConApp_maybe, tyVarsOfType, mkForAllTys, Type ) -import PprType ( {- instance Outputable Type -} ) import TysPrim ( byteArrayPrimTy, realWorldStatePrimTy, byteArrayPrimTyCon, mutableByteArrayPrimTyCon ) import TysWiredIn ( unitDataConId, stringTy, diff --git a/ghc/compiler/deSugar/DsExpr.lhs b/ghc/compiler/deSugar/DsExpr.lhs index 5e78e8e..c812165 100644 --- a/ghc/compiler/deSugar/DsExpr.lhs +++ b/ghc/compiler/deSugar/DsExpr.lhs @@ -43,7 +43,6 @@ import Type ( splitFunTys, mkTyConApp, isNotUsgTy, unUsgTy, splitAppTy, isUnLiftedType, Type ) -import PprType ( {- instance Outputable Type -} ) import TysWiredIn ( tupleCon, unboxedTupleCon, listTyCon, mkListTy, charDataCon, charTy, stringTy, diff --git a/ghc/compiler/deSugar/DsForeign.lhs b/ghc/compiler/deSugar/DsForeign.lhs index 4f03dbc..8e4d0b7 100644 --- a/ghc/compiler/deSugar/DsForeign.lhs +++ b/ghc/compiler/deSugar/DsForeign.lhs @@ -36,7 +36,6 @@ import Type ( splitAlgTyConApp_maybe, unUsgTy, Type, mkFunTys, mkForAllTys, mkTyConApp, mkTyVarTy, mkFunTy, splitAppTy ) -import PprType ( {- instance Outputable Type -} ) import PrimOp ( PrimOp(..), CCall(..), CCallTarget(..) ) import Var ( TyVar ) import TysPrim ( realWorldStatePrimTy, addrPrimTy ) diff --git a/ghc/compiler/hsSyn/HsCore.lhs b/ghc/compiler/hsSyn/HsCore.lhs index f682752..1837027 100644 --- a/ghc/compiler/hsSyn/HsCore.lhs +++ b/ghc/compiler/hsSyn/HsCore.lhs @@ -30,7 +30,6 @@ import Demand ( Demand ) import Literal ( Literal ) import PrimOp ( CCall, pprCCallOp ) import Type ( Kind ) -import PprType ( {- instance Outputable Kind -} ) import CostCentre import SrcLoc ( SrcLoc ) import Outputable diff --git a/ghc/compiler/rename/RnIfaces.lhs b/ghc/compiler/rename/RnIfaces.lhs index d15cd25..ff3f51c 100644 --- a/ghc/compiler/rename/RnIfaces.lhs +++ b/ghc/compiler/rename/RnIfaces.lhs @@ -196,12 +196,10 @@ addModDeps mod mod_deps new_deps -- either are dependent via a non-library module -- or contain orphan rules or instance decls - -- Don't ditch a module that's already loaded - -- If it isn't loaded, and together the is_boot-ness - combine old@(_, _, _, Just _) new = old - combine old@(_, _, old_is_boot, Nothing) - new@(version, has_orphans, new_is_boot, _) - = (version, has_orphans, old_is_boot && new_is_boot, Nothing) + combine old@(_, _, old_is_boot, cts) new + | maybeToBool cts || not old_is_boot = old -- Keep the old info if it's already loaded + -- or if it's a non-boot pending load + | otherwise = new -- Otherwise pick new info loadExport :: ModuleName -> ExportItem -> RnM d [AvailInfo] loadExport this_mod (mod, entities) @@ -761,6 +759,13 @@ getImportVersions this_mod (ExportEnv _ _ export_all_mods) -- I can't be bothered just now. mk_version_info mod_name (version, has_orphans, is_boot, contents) so_far + | mod_name == this_mod -- Check if M appears in the set of modules 'below' M + -- This seems like a convenient place to check + = WARN( not is_boot, ptext SLIT("Wierd:") <+> ppr this_mod <+> + ptext SLIT("imports itself (perhaps indirectly)") ) + so_far + + | otherwise = let go_for_it exports = (mod_name, version, has_orphans, is_boot, exports) : so_far @@ -794,10 +799,6 @@ getImportVersions this_mod (ExportEnv _ _ export_all_mods) is_lib_module = isLibModule mod in - -- A module shouldn't load its own interface - -- This seems like a convenient place to check - WARN( maybeToBool (lookupFM mod_map this_mod), - ptext SLIT("Wierd:") <+> ppr this_mod <+> ptext SLIT("loads its own interface") ) returnRn (foldFM mk_version_info [] mod_map) where diff --git a/ghc/compiler/simplCore/SimplUtils.lhs b/ghc/compiler/simplCore/SimplUtils.lhs index 58062d2..22d1357 100644 --- a/ghc/compiler/simplCore/SimplUtils.lhs +++ b/ghc/compiler/simplCore/SimplUtils.lhs @@ -36,7 +36,6 @@ import SimplMonad import Type ( Type, tyVarsOfType, tyVarsOfTypes, mkForAllTys, seqType, splitTyConApp_maybe, splitAlgTyConApp_maybe, mkTyVarTys, applyTys, splitFunTys, mkFunTys ) -import PprType ( {- instance Outputable Type -} ) import DataCon ( dataConRepArity ) import TysPrim ( statePrimTyCon ) import Var ( setVarUnique ) diff --git a/ghc/compiler/specialise/Specialise.lhs b/ghc/compiler/specialise/Specialise.lhs index 81799e5..3154df7 100644 --- a/ghc/compiler/specialise/Specialise.lhs +++ b/ghc/compiler/specialise/Specialise.lhs @@ -21,7 +21,6 @@ import Type ( Type, mkTyVarTy, splitSigmaTy, splitFunTysN, tyVarsOfType, tyVarsOfTypes, tyVarsOfTheta, applyTys, mkForAllTys, boxedTypeKind ) -import PprType ( {- instance Outputable Type -} ) import Subst ( Subst, mkSubst, substTy, emptySubst, substBndrs, extendSubstList, substId, substAndCloneId, substAndCloneIds, lookupIdSubst ) diff --git a/ghc/compiler/stgSyn/StgLint.lhs b/ghc/compiler/stgSyn/StgLint.lhs index c7c126d..c0300a5 100644 --- a/ghc/compiler/stgSyn/StgLint.lhs +++ b/ghc/compiler/stgSyn/StgLint.lhs @@ -22,7 +22,6 @@ import ErrUtils ( ErrMsg, Message, addErrLocHdrLine, pprBagOfErrors, dontAddErr import Type ( mkFunTys, splitFunTys, splitAlgTyConApp_maybe, isUnLiftedType, isTyVarTy, splitForAllTys, Type ) -import PprType ( {- instance Outputable Type -} ) import TyCon ( TyCon, isDataTyCon ) import Util ( zipEqual ) import Outputable diff --git a/ghc/compiler/stgSyn/StgSyn.lhs b/ghc/compiler/stgSyn/StgSyn.lhs index 429d24f..759c174 100644 --- a/ghc/compiler/stgSyn/StgSyn.lhs +++ b/ghc/compiler/stgSyn/StgSyn.lhs @@ -53,7 +53,6 @@ import PrimOp ( PrimOp ) import PrimRep ( PrimRep(..) ) import Outputable import Type ( Type ) -import PprType ( {- instance Outputable Type -} ) import UniqSet ( isEmptyUniqSet, uniqSetToList, UniqSet ) \end{code} diff --git a/ghc/compiler/typecheck/TcBinds.lhs b/ghc/compiler/typecheck/TcBinds.lhs index cd132e9..a7a589c 100644 --- a/ghc/compiler/typecheck/TcBinds.lhs +++ b/ghc/compiler/typecheck/TcBinds.lhs @@ -54,7 +54,6 @@ import Type ( mkTyVarTy, tyVarsOfTypes, mkTyConApp, mkPredTy, splitRhoTy, mkForAllTy, isUnLiftedType, isUnboxedType, unboxedTypeKind, boxedTypeKind ) -import PprType ( {- instance Outputable Type -} ) import FunDeps ( tyVarFunDep, oclose ) import Var ( TyVar, tyVarKind ) import VarSet diff --git a/ghc/compiler/typecheck/TcClassDcl.lhs b/ghc/compiler/typecheck/TcClassDcl.lhs index 9c36c70..7ffce22 100644 --- a/ghc/compiler/typecheck/TcClassDcl.lhs +++ b/ghc/compiler/typecheck/TcClassDcl.lhs @@ -57,7 +57,6 @@ import Type ( Type, ThetaType, ClassContext, mkSigmaTy, mkForAllTys, mkClassPred, classesOfPreds, boxedTypeKind, mkArrowKind ) -import PprType ( {- instance Outputable Type -} ) import Var ( tyVarKind, TyVar ) import VarSet ( mkVarSet, emptyVarSet ) import TyCon ( mkAlgTyCon ) diff --git a/ghc/compiler/typecheck/TcDeriv.lhs b/ghc/compiler/typecheck/TcDeriv.lhs index c929ed1..156a180 100644 --- a/ghc/compiler/typecheck/TcDeriv.lhs +++ b/ghc/compiler/typecheck/TcDeriv.lhs @@ -51,7 +51,6 @@ import Type ( TauType, mkTyVarTys, mkTyConApp, mkSigmaTy, mkDictTy, isUnboxedType, splitAlgTyConApp, classesToPreds ) -import PprType ( {- instance Outputable Type -} ) import TysWiredIn ( voidTy ) import Var ( TyVar ) import Unique -- Keys stuff diff --git a/ghc/compiler/typecheck/TcForeign.lhs b/ghc/compiler/typecheck/TcForeign.lhs index 27c6c14..58c73ab 100644 --- a/ghc/compiler/typecheck/TcForeign.lhs +++ b/ghc/compiler/typecheck/TcForeign.lhs @@ -45,7 +45,6 @@ import Type ( splitFunTys , isForAllTy , mkForAllTys ) -import PprType ( {- instance Outputable Type -} ) import TysWiredIn ( isFFIArgumentTy, isFFIResultTy, isFFIExternalTy, isAddrTy diff --git a/ghc/compiler/typecheck/TcMonad.lhs b/ghc/compiler/typecheck/TcMonad.lhs index 517265a..1b442af 100644 --- a/ghc/compiler/typecheck/TcMonad.lhs +++ b/ghc/compiler/typecheck/TcMonad.lhs @@ -49,7 +49,6 @@ import HsSyn ( HsLit ) import RnHsSyn ( RenamedPat, RenamedArithSeqInfo, RenamedHsExpr ) import Type ( Type, Kind, PredType, ThetaType, RhoType, TauType, ) -import PprType ( {- instance Outputable Type -} ) import ErrUtils ( addShortErrLocLine, addShortWarnLocLine, pprBagOfErrors, ErrMsg, Message, WarnMsg ) import CmdLineOpts ( opt_PprStyle_Debug ) diff --git a/ghc/compiler/typecheck/TcPat.lhs b/ghc/compiler/typecheck/TcPat.lhs index 5cd7e05..88914ac 100644 --- a/ghc/compiler/typecheck/TcPat.lhs +++ b/ghc/compiler/typecheck/TcPat.lhs @@ -37,7 +37,6 @@ import DataCon ( DataCon, dataConSig, dataConFieldLabels, ) import Id ( Id, idType, isDataConWrapId_maybe ) import Type ( Type, isTauTy, mkTyConApp, mkClassPred, boxedTypeKind ) -import PprType ( {- instance Outputable Type -} ) import Subst ( substTy, substClasses ) import TysPrim ( charPrimTy, intPrimTy, floatPrimTy, doublePrimTy, addrPrimTy diff --git a/ghc/compiler/types/Unify.lhs b/ghc/compiler/types/Unify.lhs index bd9cde1..f5f6111 100644 --- a/ghc/compiler/types/Unify.lhs +++ b/ghc/compiler/types/Unify.lhs @@ -16,6 +16,11 @@ import TypeRep ( Type(..), funTyCon import Type ( typeKind, tyVarsOfType, splitAppTy_maybe ) +import PprType () -- Instances + -- This import isn't strictly necessary, but it makes sure that + -- PprType is below Unify in the hierarchy, which in turn makes + -- fewer modules boot-import PprType + import Var ( TyVar, tyVarKind ) import VarSet import VarEnv ( TyVarSubstEnv, emptySubstEnv, lookupSubstEnv, extendSubstEnv,