diff options
Diffstat (limited to 'ghc/compiler/uniType/UniTyFuns.hi')
-rw-r--r-- | ghc/compiler/uniType/UniTyFuns.hi | 175 |
1 files changed, 175 insertions, 0 deletions
diff --git a/ghc/compiler/uniType/UniTyFuns.hi b/ghc/compiler/uniType/UniTyFuns.hi new file mode 100644 index 0000000000..acba0fe4ee --- /dev/null +++ b/ghc/compiler/uniType/UniTyFuns.hi @@ -0,0 +1,175 @@ +{-# GHC_PRAGMA INTERFACE VERSION 5 #-} +interface UniTyFuns where +import Bag(Bag) +import BasicLit(BasicLit) +import BinderInfo(BinderInfo) +import CharSeq(CSeq) +import Class(Class, ClassOp) +import CmdLineOpts(GlobalSwitch) +import CoreSyn(CoreAtom, CoreExpr) +import Id(Id) +import IdEnv(IdEnv(..)) +import InstEnv(InstTemplate) +import MagicUFs(MagicUnfoldingFun) +import Maybes(Labda) +import NameTypes(FullName, ShortName) +import PreludePS(_PackedString) +import Pretty(Delay, PprStyle, PrettyRep) +import PrimKind(PrimKind) +import SimplEnv(FormSummary, UnfoldingDetails, UnfoldingGuidance) +import SplitUniq(SplitUniqSupply) +import TyCon(TyCon) +import TyVar(TyVar, TyVarTemplate) +import TyVarEnv(TyVarEnv(..), TypeEnv(..)) +import UniType(UniType) +import UniqFM(UniqFM) +import Unique(Unique, UniqueSupply) +data Bag a {-# GHC_PRAGMA EmptyBag | UnitBag a | TwoBags (Bag a) (Bag a) | ListOfBags [Bag a] #-} +data Class {-# GHC_PRAGMA MkClass Unique FullName TyVarTemplate [Class] [Id] [ClassOp] [Id] [Id] [(UniType, InstTemplate)] [(Class, [Class])] #-} +type IdEnv a = UniqFM a +data Labda a {-# GHC_PRAGMA Hamna | Ni a #-} +data PprStyle {-# GHC_PRAGMA PprForUser | PprDebug | PprShowAll | PprInterface (GlobalSwitch -> Bool) | PprForC (GlobalSwitch -> Bool) | PprUnfolding (GlobalSwitch -> Bool) | PprForAsm (GlobalSwitch -> Bool) Bool ([Char] -> [Char]) #-} +data PrettyRep {-# GHC_PRAGMA MkPrettyRep CSeq (Delay Int) Bool Bool #-} +data PrimKind {-# GHC_PRAGMA PtrKind | CodePtrKind | DataPtrKind | RetKind | InfoPtrKind | CostCentreKind | CharKind | IntKind | WordKind | AddrKind | FloatKind | DoubleKind | MallocPtrKind | StablePtrKind | ArrayKind | ByteArrayKind | VoidKind #-} +data UnfoldingDetails {-# GHC_PRAGMA NoUnfoldingDetails | LiteralForm BasicLit | OtherLiteralForm [BasicLit] | ConstructorForm Id [UniType] [CoreAtom Id] | OtherConstructorForm [Id] | GeneralForm Bool FormSummary (CoreExpr (Id, BinderInfo) Id) UnfoldingGuidance | MagicForm _PackedString MagicUnfoldingFun | IWantToBeINLINEd UnfoldingGuidance #-} +data TyCon {-# GHC_PRAGMA SynonymTyCon Unique FullName Int [TyVarTemplate] UniType Bool | DataTyCon Unique FullName Int [TyVarTemplate] [Id] [Class] Bool | TupleTyCon Int | PrimTyCon Unique FullName Int ([PrimKind] -> PrimKind) | SpecTyCon TyCon [Labda UniType] #-} +data TyVar {-# GHC_PRAGMA PrimSysTyVar Unique | PolySysTyVar Unique | OpenSysTyVar Unique | UserTyVar Unique ShortName #-} +data TyVarTemplate {-# GHC_PRAGMA SysTyVarTemplate Unique _PackedString | UserTyVarTemplate Unique ShortName #-} +type TyVarEnv a = UniqFM a +type TypeEnv = UniqFM UniType +data UniType {-# GHC_PRAGMA UniTyVar TyVar | UniFun UniType UniType | UniData TyCon [UniType] | UniSyn TyCon [UniType] UniType | UniDict Class UniType | UniTyVarTemplate TyVarTemplate | UniForall TyVarTemplate UniType #-} +data UniqFM a {-# GHC_PRAGMA EmptyUFM | LeafUFM Int# a | NodeUFM Int# Int# (UniqFM a) (UniqFM a) #-} +data UniqueSupply {-# GHC_PRAGMA MkUniqueSupply Int# | MkNewSupply SplitUniqSupply #-} +applyNonSynTyCon :: TyCon -> [UniType] -> UniType + {-# GHC_PRAGMA _A_ 2 _U_ 22 _N_ _N_ _F_ _IF_ARGS_ 0 2 XX 3 \ (u0 :: TyCon) (u1 :: [UniType]) -> _!_ _ORIG_ UniType UniData [] [u0, u1] _N_ #-} +applySynTyCon :: TyCon -> [UniType] -> UniType + {-# GHC_PRAGMA _A_ 2 _U_ 22 _N_ _N_ _N_ _N_ #-} +applyTy :: UniType -> UniType -> UniType + {-# GHC_PRAGMA _A_ 2 _U_ 12 _N_ _S_ "SL" _N_ _N_ #-} +applyTyCon :: TyCon -> [UniType] -> UniType + {-# GHC_PRAGMA _A_ 2 _U_ 22 _N_ _S_ "SL" _N_ _N_ #-} +applyTypeEnvToThetaTy :: UniqFM UniType -> [(a, UniType)] -> [(a, UniType)] + {-# GHC_PRAGMA _A_ 2 _U_ 21 _N_ _S_ "LS" _N_ _N_ #-} +applyTypeEnvToTy :: UniqFM UniType -> UniType -> UniType + {-# GHC_PRAGMA _A_ 2 _U_ 21 _N_ _S_ "LS" _N_ _N_ #-} +cmpUniTypeMaybeList :: [Labda UniType] -> [Labda UniType] -> Int# + {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "SS" _N_ _N_ #-} +expandVisibleTySyn :: UniType -> UniType + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "S" _N_ _N_ #-} +extractTyVarTemplatesFromTy :: UniType -> [TyVarTemplate] + {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-} +extractTyVarsFromTy :: UniType -> [TyVar] + {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-} +extractTyVarsFromTys :: [UniType] -> [TyVar] + {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-} +funResultTy :: UniType -> Int -> UniType + {-# GHC_PRAGMA _A_ 2 _U_ 21 _N_ _S_ "SU(P)" {_A_ 2 _U_ 22 _N_ _N_ _N_ _N_} _N_ _N_ #-} +getMentionedTyCons :: TyCon -> [TyCon] + {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-} +getMentionedTyConsAndClassesFromClass :: Class -> (Bag TyCon, Bag Class) + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "U(LLLLLSLLLL)" _N_ _N_ #-} +getMentionedTyConsAndClassesFromTyCon :: TyCon -> (Bag TyCon, Bag Class) + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "S" _N_ _N_ #-} +getMentionedTyConsAndClassesFromUniType :: UniType -> (Bag TyCon, Bag Class) + {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-} +getTauType :: UniType -> UniType + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "S" _F_ _IF_ARGS_ 0 1 X 4 \ (u0 :: UniType) -> case _APP_ _ORIG_ UniTyFuns splitType [ u0 ] of { _ALG_ _TUP_3 (u1 :: [TyVarTemplate]) (u2 :: [(Class, UniType)]) (u3 :: UniType) -> u3; _NO_DEFLT_ } _N_ #-} +getTyVar :: [Char] -> UniType -> TyVar + {-# GHC_PRAGMA _A_ 2 _U_ 21 _N_ _S_ "LS" _N_ _N_ #-} +getTyVarMaybe :: UniType -> Labda TyVar + {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-} +getTyVarTemplateMaybe :: UniType -> Labda TyVarTemplate + {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-} +getTypeString :: UniType -> [_PackedString] + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "S" _N_ _N_ #-} +getUniDataSpecTyCon :: UniType -> (TyCon, [UniType], [Id]) + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "S" _N_ _N_ #-} +getUniDataSpecTyCon_maybe :: UniType -> Labda (TyCon, [UniType], [Id]) + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "S" _N_ _N_ #-} +getUniDataTyCon :: UniType -> (TyCon, [UniType], [Id]) + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "S" _N_ _N_ #-} +getUniDataTyCon_maybe :: UniType -> Labda (TyCon, [UniType], [Id]) + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "S" _N_ _N_ #-} +getUniTyDescription :: UniType -> [Char] + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "S" _N_ _N_ #-} +glueTyArgs :: [UniType] -> UniType -> UniType + {-# GHC_PRAGMA _A_ 2 _U_ 12 _N_ _S_ "SL" _N_ _N_ #-} +instanceIsExported :: Class -> UniType -> Bool -> Bool + {-# GHC_PRAGMA _A_ 3 _U_ 121 _N_ _S_ "U(AU(AASLAA)AAAAAAAA)SL" {_A_ 4 _U_ 2121 _N_ _N_ _N_ _N_} _N_ _N_ #-} +isDictTy :: UniType -> Bool + {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-} +isForAllTy :: UniType -> Bool + {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-} +isFunType :: UniType -> Bool + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "S" _N_ _N_ #-} +isGroundOrTyVarTy :: UniType -> Bool + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "S" _N_ _N_ #-} +isGroundTy :: UniType -> Bool + {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-} +isLeakFreeType :: [TyCon] -> UniType -> Bool + {-# GHC_PRAGMA _A_ 2 _U_ 21 _N_ _S_ "LS" _N_ _N_ #-} +isPrimType :: UniType -> Bool + {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-} +isTauTy :: UniType -> Bool + {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-} +isTyVarTemplateTy :: UniType -> Bool + {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-} +isTyVarTy :: UniType -> Bool + {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-} +isUnboxedDataType :: UniType -> Bool + {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-} +kindFromType :: UniType -> PrimKind + {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-} +mapOverTyVars :: (TyVar -> UniType) -> UniType -> UniType + {-# GHC_PRAGMA _A_ 2 _U_ 21 _N_ _S_ "LS" _N_ _N_ #-} +matchTy :: UniType -> UniType -> Labda [(TyVarTemplate, UniType)] + {-# GHC_PRAGMA _A_ 2 _U_ 22 _N_ _S_ "SL" _N_ _N_ #-} +maybeBoxedPrimType :: UniType -> Labda (Id, UniType) + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "S" _N_ _N_ #-} +maybePurelyLocalClass :: Class -> Labda [Int -> Bool -> PrettyRep] + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "U(LLLLLSLLLL)" _N_ _N_ #-} +maybePurelyLocalTyCon :: TyCon -> Labda [Int -> Bool -> PrettyRep] + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "S" _N_ _N_ #-} +maybePurelyLocalType :: UniType -> Labda [Int -> Bool -> PrettyRep] + {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-} +maybeUnpackFunTy :: UniType -> Labda (UniType, UniType) + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "S" _N_ _N_ #-} +mkSuperDictSelType :: Class -> Class -> UniType + {-# GHC_PRAGMA _A_ 2 _U_ 22 _N_ _S_ "U(LLLLLLLLLL)L" _N_ _N_ #-} +pprClassOp :: PprStyle -> ClassOp -> Int -> Bool -> PrettyRep + {-# GHC_PRAGMA _A_ 2 _U_ 2122 _N_ _S_ "SU(LAL)" {_A_ 3 _U_ 22222 _N_ _N_ _N_ _N_} _N_ _N_ #-} +pprIfaceClass :: (GlobalSwitch -> Bool) -> (Id -> Id) -> UniqFM UnfoldingDetails -> Class -> Int -> Bool -> PrettyRep + {-# GHC_PRAGMA _A_ 4 _U_ 222122 _N_ _S_ "LLLU(ALLLLLLLAA)" _N_ _N_ #-} +pprMaybeTy :: PprStyle -> Labda UniType -> Int -> Bool -> PrettyRep + {-# GHC_PRAGMA _A_ 2 _U_ 2122 _N_ _S_ "SS" _N_ _N_ #-} +pprParendUniType :: PprStyle -> UniType -> Int -> Bool -> PrettyRep + {-# GHC_PRAGMA _A_ 2 _U_ 2222 _N_ _S_ "LS" _N_ _N_ #-} +pprTyCon :: PprStyle -> TyCon -> [[Labda UniType]] -> Int -> Bool -> PrettyRep + {-# GHC_PRAGMA _A_ 3 _U_ 22222 _N_ _S_ "SSL" _N_ _N_ #-} +pprUniType :: PprStyle -> UniType -> Int -> Bool -> PrettyRep + {-# GHC_PRAGMA _A_ 2 _U_ 2222 _N_ _S_ "LS" _N_ _N_ #-} +returnsRealWorld :: UniType -> Bool + {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-} +showTyCon :: PprStyle -> TyCon -> [Char] + {-# GHC_PRAGMA _A_ 2 _U_ 22 _N_ _S_ "SS" _N_ _N_ #-} +showTypeCategory :: UniType -> Char + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "S" _N_ _N_ #-} +specMaybeTysSuffix :: [Labda UniType] -> _PackedString + {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-} +specialiseTy :: UniType -> [Labda UniType] -> Int -> UniType + {-# GHC_PRAGMA _A_ 3 _U_ 211 _N_ _S_ "SLL" _N_ _N_ #-} +splitDictType :: UniType -> (Class, UniType) + {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-} +splitForalls :: UniType -> ([TyVarTemplate], UniType) + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "S" _N_ _N_ #-} +splitTyArgs :: UniType -> ([UniType], UniType) + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "S" _N_ _N_ #-} +splitType :: UniType -> ([TyVarTemplate], [(Class, UniType)], UniType) + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "S" _N_ _N_ #-} +splitTypeWithDictsAsArgs :: UniType -> ([TyVarTemplate], [UniType], UniType) + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "S" _N_ _N_ #-} +typeMaybeString :: Labda UniType -> [_PackedString] + {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-} +unDictifyTy :: UniType -> UniType + {-# GHC_PRAGMA _A_ 1 _U_ 2 _N_ _S_ "S" _N_ _N_ #-} + |