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
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,
)
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,
import Outputable
import FastString ( unpackFS )
import FastTypes
-import GlaExts ( Int(..), (+#) )
+import GlaExts ( (+#) )
\end{code}
%************************************************************************
%
% (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 $
%
%********************************************************
%* *
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 )
%
% (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}
import PrimRep ( PrimRep(..), isFollowableRep )
import Unique ( Unique )
import CmdLineOpts ( opt_SccProfilingOn, opt_GranMacros )
-import Constants ( bLOCK_SIZE_W )
import GlaExts
import Outputable
#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
)
import HscTypes ( ModDetails(..), implicitTyThingIds, typeEnvElts )
import Unique ( mkBuiltinUnique )
-import BasicTypes ( Arity, TopLevelFlag(..), isTopLevel, isNotTopLevel,
+import BasicTypes ( TopLevelFlag(..), isTopLevel, isNotTopLevel,
RecFlag(..), isNonRec
)
import UniqSupply
module ExternalCore where
-import List (elemIndex)
data Module
= Module Mname [Tdef] [Vdefg]
import CmdLineOpts ( dynFlag, verbosity )
import DriverUtil ( my_prefix_match )
import ErrUtils ( dumpIfSet )
-import Outputable ( docToSDoc, trace )
+import Outputable ( docToSDoc )
\end{code}
\begin{code}
#include "NCG.h"
import AbsCSyn ( AbstractC(..), Liveness(..), C_SRT(..), needsSRT )
-import CLabel ( CLabel )
import StgSyn ( SRT(..) )
import ClosureInfo ( closurePtrsSize,
closureNonHdrSize, closureSMRep,
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
)
import CostCentre ( CostCentre(..), IsCafCC(..), IsDupdCC(..) )
import Type ( Kind, mkArrowKind, liftedTypeKind, openTypeKind, usageTypeKind )
-import IdInfo ( InlinePragInfo(..) )
import ForeignCall ( ForeignCall(..), CCallConv(..), CCallSpec(..), CCallTarget(..) )
import Lex
import UniqFM ( lookupWithDefaultUFM )
import CmdLineOpts
import FastString ( FastString )
-
-import Maybe ( isJust )
\end{code}
%*********************************************************
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 )
#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
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
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
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
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 )
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
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,
import TysWiredIn ( boolTy )
import Id ( idType )
import BasicTypes ( RecFlag(..) )
-import NameSet
import VarSet
import Var ( Id )
import Bag
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,
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_ )
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,
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
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 )
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 )
#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