Commit 783e505e authored by simonpj's avatar simonpj
Browse files

[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!
parent a127213c
%
% (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
......
%
% (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(..) )
......
......@@ -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
......
......@@ -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,
......
......@@ -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,
......
......@@ -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 )
......
......@@ -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
......
......@@ -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
......
......@@ -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 )
......
......@@ -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
)
......
......@@ -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
......
......@@ -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}
......
......@@ -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
......
......@@ -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 )
......
......@@ -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
......
......@@ -45,7 +45,6 @@ import Type ( splitFunTys
, isForAllTy
, mkForAllTys
)
import PprType ( {- instance Outputable Type -} )
import TysWiredIn ( isFFIArgumentTy, isFFIResultTy,
isFFIExternalTy, isAddrTy
......
......@@ -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 )
......
......@@ -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
......
......@@ -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,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment