[project @ 1996-01-11 14:06:51 by partain]
[ghc-hetmet.git] / ghc / compiler / uniType / AbsUniType.hi
1 {-# GHC_PRAGMA INTERFACE VERSION 5 #-}
2 interface AbsUniType where
3 import Bag(Bag)
4 import Class(Class, ClassOp, cmpClass, derivableClassKeys, getClassBigSig, getClassInstEnv, getClassKey, getClassOpId, getClassOpLocalType, getClassOpString, getClassOpTag, getClassOps, getClassSig, getConstMethodId, getDefaultMethodId, getSuperDictSelId, isNumericClass, isStandardClass, isSuperClassOf, mkClass, mkClassOp)
5 import CmdLineOpts(GlobalSwitch)
6 import Id(DataCon(..), Id)
7 import IdEnv(IdEnv(..))
8 import InstEnv(ClassInstEnv(..), InstTemplate, MatchEnv(..))
9 import Maybes(Labda)
10 import Name(Name)
11 import NameTypes(FullName, ShortName)
12 import Outputable(ExportFlag, NamedThing, Outputable)
13 import PreludePS(_PackedString)
14 import Pretty(PprStyle, Pretty(..), PrettyRep)
15 import PrimKind(PrimKind)
16 import SimplEnv(UnfoldingDetails)
17 import TyCon(Arity(..), TyCon, cmpTyCon, derivedFor, eqTyCon, getTyConArity, getTyConDataCons, getTyConDerivings, getTyConFamilySize, getTyConKind, getTyConTyVarTemplates, isBigTupleTyCon, isBoxedTyCon, isDataTyCon, isEnumerationTyCon, isLocalGenTyCon, isLocalSpecTyCon, isPrimTyCon, isSynTyCon, isTupleTyCon, isVisibleSynTyCon, maybeCharLikeTyCon, maybeDoubleLikeTyCon, maybeFloatLikeTyCon, maybeIntLikeTyCon, maybeSingleConstructorTyCon, mkDataTyCon, mkPrimTyCon, mkSpecTyCon, mkSynonymTyCon, mkTupleTyCon)
18 import TyVar(TyVar, TyVarTemplate, alphaTyVars, alpha_tv, alpha_tyvar, beta_tv, beta_tyvar, cloneTyVar, cloneTyVarFromTemplate, cmpTyVar, delta_tv, delta_tyvar, epsilon_tv, epsilon_tyvar, eqTyVar, gamma_tv, gamma_tyvar, instantiateTyVarTemplates, ltTyVar, mkOpenSysTyVar, mkPolySysTyVar, mkSysTyVarTemplate, mkTemplateTyVars, mkUserTyVar, mkUserTyVarTemplate)
19 import TyVarEnv(TyVarEnv(..), TypeEnv(..))
20 import UniTyFuns(applyNonSynTyCon, applySynTyCon, applyTy, applyTyCon, applyTypeEnvToThetaTy, applyTypeEnvToTy, cmpUniTypeMaybeList, expandVisibleTySyn, extractTyVarTemplatesFromTy, extractTyVarsFromTy, extractTyVarsFromTys, funResultTy, getMentionedTyCons, getMentionedTyConsAndClassesFromClass, getMentionedTyConsAndClassesFromTyCon, getMentionedTyConsAndClassesFromUniType, getTauType, getTyVar, getTyVarMaybe, getTyVarTemplateMaybe, getTypeString, getUniDataSpecTyCon, getUniDataSpecTyCon_maybe, getUniDataTyCon, getUniDataTyCon_maybe, getUniTyDescription, glueTyArgs, instanceIsExported, isDictTy, isForAllTy, isFunType, isGroundOrTyVarTy, isGroundTy, isLeakFreeType, isPrimType, isTauTy, isTyVarTemplateTy, isTyVarTy, isUnboxedDataType, kindFromType, mapOverTyVars, matchTy, maybeBoxedPrimType, maybePurelyLocalClass, maybePurelyLocalTyCon, maybePurelyLocalType, maybeUnpackFunTy, mkSuperDictSelType, pprClassOp, pprIfaceClass, pprMaybeTy, pprParendUniType, pprTyCon, pprUniType, returnsRealWorld, showTyCon, showTypeCategory, specMaybeTysSuffix, specialiseTy, splitDictType, splitForalls, splitTyArgs, splitType, splitTypeWithDictsAsArgs, typeMaybeString, unDictifyTy)
21 import UniType(InstTyEnv(..), RhoType(..), SigmaType(..), TauType(..), ThetaType(..), UniType, alpha, alpha_ty, beta, beta_ty, cmpUniType, delta, delta_ty, epsilon, epsilon_ty, gamma, gamma_ty, instantiateTauTy, instantiateThetaTy, instantiateTy, mkDictTy, mkForallTy, mkRhoTy, mkSigmaTy, mkTyVarTemplateTy, mkTyVarTy, quantifyTy)
22 import UniqFM(UniqFM)
23 import Unique(Unique)
24 data Bag a 
25 data Class 
26 data ClassOp 
27 data GlobalSwitch 
28 type DataCon = Id
29 data Id 
30 type IdEnv a = UniqFM a
31 type ClassInstEnv = [(UniType, InstTemplate)]
32 data InstTemplate 
33 type MatchEnv a b = [(a, b)]
34 data Labda a 
35 data Name 
36 data FullName 
37 data ShortName 
38 data ExportFlag 
39 data PprStyle 
40 type Pretty = Int -> Bool -> PrettyRep
41 data PrettyRep 
42 data PrimKind 
43 data UnfoldingDetails 
44 type Arity = Int
45 data TyCon 
46 data TyVar 
47 data TyVarTemplate 
48 type TyVarEnv a = UniqFM a
49 type TypeEnv = UniqFM UniType
50 type InstTyEnv = [(TyVarTemplate, UniType)]
51 type RhoType = UniType
52 type SigmaType = UniType
53 type TauType = UniType
54 type ThetaType = [(Class, UniType)]
55 data UniType 
56 data UniqFM a 
57 data Unique 
58 cmpClass :: Class -> Class -> Int#
59 derivableClassKeys :: [Unique]
60 getClassBigSig :: Class -> (TyVarTemplate, [Class], [Id], [ClassOp], [Id], [Id])
61 getClassInstEnv :: Class -> [(UniType, InstTemplate)]
62 getClassKey :: Class -> Unique
63 getClassOpId :: Class -> ClassOp -> Id
64 getClassOpLocalType :: ClassOp -> UniType
65 getClassOpString :: ClassOp -> _PackedString
66 getClassOpTag :: ClassOp -> Int
67 getClassOps :: Class -> [ClassOp]
68 getClassSig :: Class -> (TyVarTemplate, [Class], [ClassOp])
69 getConstMethodId :: Class -> ClassOp -> UniType -> Id
70 getDefaultMethodId :: Class -> ClassOp -> Id
71 getSuperDictSelId :: Class -> Class -> Id
72 isNumericClass :: Class -> Bool
73 isStandardClass :: Class -> Bool
74 isSuperClassOf :: Class -> Class -> Labda [Class]
75 mkClass :: Name -> TyVarTemplate -> [Class] -> [Id] -> [ClassOp] -> [Id] -> [Id] -> [(UniType, InstTemplate)] -> Class
76 mkClassOp :: _PackedString -> Int -> UniType -> ClassOp
77 cmpTyCon :: TyCon -> TyCon -> Int#
78 derivedFor :: Class -> TyCon -> Bool
79 eqTyCon :: TyCon -> TyCon -> Bool
80 getTyConArity :: TyCon -> Int
81 getTyConDataCons :: TyCon -> [Id]
82 getTyConDerivings :: TyCon -> [Class]
83 getTyConFamilySize :: TyCon -> Labda Int
84 getTyConKind :: TyCon -> [PrimKind] -> PrimKind
85 getTyConTyVarTemplates :: TyCon -> [TyVarTemplate]
86 isBigTupleTyCon :: TyCon -> Bool
87 isBoxedTyCon :: TyCon -> Bool
88 isDataTyCon :: TyCon -> Bool
89 isEnumerationTyCon :: TyCon -> Bool
90 isLocalGenTyCon :: TyCon -> Bool
91 isLocalSpecTyCon :: Bool -> TyCon -> Bool
92 isPrimTyCon :: TyCon -> Bool
93 isSynTyCon :: TyCon -> Bool
94 isTupleTyCon :: TyCon -> Bool
95 isVisibleSynTyCon :: TyCon -> Bool
96 maybeCharLikeTyCon :: TyCon -> Labda Id
97 maybeDoubleLikeTyCon :: TyCon -> Labda Id
98 maybeFloatLikeTyCon :: TyCon -> Labda Id
99 maybeIntLikeTyCon :: TyCon -> Labda Id
100 maybeSingleConstructorTyCon :: TyCon -> Labda Id
101 mkDataTyCon :: Unique -> FullName -> Int -> [TyVarTemplate] -> [Id] -> [Class] -> Bool -> TyCon
102 mkPrimTyCon :: Unique -> FullName -> Int -> ([PrimKind] -> PrimKind) -> TyCon
103 mkSpecTyCon :: TyCon -> [Labda UniType] -> TyCon
104 mkSynonymTyCon :: Unique -> FullName -> Int -> [TyVarTemplate] -> UniType -> Bool -> TyCon
105 mkTupleTyCon :: Int -> TyCon
106 alphaTyVars :: [TyVarTemplate]
107 alpha_tv :: TyVarTemplate
108 alpha_tyvar :: TyVar
109 beta_tv :: TyVarTemplate
110 beta_tyvar :: TyVar
111 cloneTyVar :: TyVar -> Unique -> TyVar
112 cloneTyVarFromTemplate :: TyVarTemplate -> Unique -> TyVar
113 cmpTyVar :: TyVar -> TyVar -> Int#
114 delta_tv :: TyVarTemplate
115 delta_tyvar :: TyVar
116 epsilon_tv :: TyVarTemplate
117 epsilon_tyvar :: TyVar
118 eqTyVar :: TyVar -> TyVar -> Bool
119 gamma_tv :: TyVarTemplate
120 gamma_tyvar :: TyVar
121 instantiateTyVarTemplates :: [TyVarTemplate] -> [Unique] -> ([(TyVarTemplate, UniType)], [TyVar], [UniType])
122 ltTyVar :: TyVar -> TyVar -> Bool
123 mkOpenSysTyVar :: Unique -> TyVar
124 mkPolySysTyVar :: Unique -> TyVar
125 mkSysTyVarTemplate :: Unique -> _PackedString -> TyVarTemplate
126 mkTemplateTyVars :: [TyVar] -> [TyVarTemplate]
127 mkUserTyVar :: Unique -> ShortName -> TyVar
128 mkUserTyVarTemplate :: Unique -> ShortName -> TyVarTemplate
129 applyNonSynTyCon :: TyCon -> [UniType] -> UniType
130 applySynTyCon :: TyCon -> [UniType] -> UniType
131 applyTy :: UniType -> UniType -> UniType
132 applyTyCon :: TyCon -> [UniType] -> UniType
133 applyTypeEnvToThetaTy :: UniqFM UniType -> [(a, UniType)] -> [(a, UniType)]
134 applyTypeEnvToTy :: UniqFM UniType -> UniType -> UniType
135 cmpUniTypeMaybeList :: [Labda UniType] -> [Labda UniType] -> Int#
136 expandVisibleTySyn :: UniType -> UniType
137 extractTyVarTemplatesFromTy :: UniType -> [TyVarTemplate]
138 extractTyVarsFromTy :: UniType -> [TyVar]
139 extractTyVarsFromTys :: [UniType] -> [TyVar]
140 funResultTy :: UniType -> Int -> UniType
141 getMentionedTyCons :: TyCon -> [TyCon]
142 getMentionedTyConsAndClassesFromClass :: Class -> (Bag TyCon, Bag Class)
143 getMentionedTyConsAndClassesFromTyCon :: TyCon -> (Bag TyCon, Bag Class)
144 getMentionedTyConsAndClassesFromUniType :: UniType -> (Bag TyCon, Bag Class)
145 getTauType :: UniType -> UniType
146 getTyVar :: [Char] -> UniType -> TyVar
147 getTyVarMaybe :: UniType -> Labda TyVar
148 getTyVarTemplateMaybe :: UniType -> Labda TyVarTemplate
149 getTypeString :: UniType -> [_PackedString]
150 getUniDataSpecTyCon :: UniType -> (TyCon, [UniType], [Id])
151 getUniDataSpecTyCon_maybe :: UniType -> Labda (TyCon, [UniType], [Id])
152 getUniDataTyCon :: UniType -> (TyCon, [UniType], [Id])
153 getUniDataTyCon_maybe :: UniType -> Labda (TyCon, [UniType], [Id])
154 getUniTyDescription :: UniType -> [Char]
155 glueTyArgs :: [UniType] -> UniType -> UniType
156 instanceIsExported :: Class -> UniType -> Bool -> Bool
157 isDictTy :: UniType -> Bool
158 isForAllTy :: UniType -> Bool
159 isFunType :: UniType -> Bool
160 isGroundOrTyVarTy :: UniType -> Bool
161 isGroundTy :: UniType -> Bool
162 isLeakFreeType :: [TyCon] -> UniType -> Bool
163 isPrimType :: UniType -> Bool
164 isTauTy :: UniType -> Bool
165 isTyVarTemplateTy :: UniType -> Bool
166 isTyVarTy :: UniType -> Bool
167 isUnboxedDataType :: UniType -> Bool
168 kindFromType :: UniType -> PrimKind
169 mapOverTyVars :: (TyVar -> UniType) -> UniType -> UniType
170 matchTy :: UniType -> UniType -> Labda [(TyVarTemplate, UniType)]
171 maybeBoxedPrimType :: UniType -> Labda (Id, UniType)
172 maybePurelyLocalClass :: Class -> Labda [Int -> Bool -> PrettyRep]
173 maybePurelyLocalTyCon :: TyCon -> Labda [Int -> Bool -> PrettyRep]
174 maybePurelyLocalType :: UniType -> Labda [Int -> Bool -> PrettyRep]
175 maybeUnpackFunTy :: UniType -> Labda (UniType, UniType)
176 mkSuperDictSelType :: Class -> Class -> UniType
177 pprClassOp :: PprStyle -> ClassOp -> Int -> Bool -> PrettyRep
178 pprIfaceClass :: (GlobalSwitch -> Bool) -> (Id -> Id) -> UniqFM UnfoldingDetails -> Class -> Int -> Bool -> PrettyRep
179 pprMaybeTy :: PprStyle -> Labda UniType -> Int -> Bool -> PrettyRep
180 pprParendUniType :: PprStyle -> UniType -> Int -> Bool -> PrettyRep
181 pprTyCon :: PprStyle -> TyCon -> [[Labda UniType]] -> Int -> Bool -> PrettyRep
182 pprUniType :: PprStyle -> UniType -> Int -> Bool -> PrettyRep
183 returnsRealWorld :: UniType -> Bool
184 showTyCon :: PprStyle -> TyCon -> [Char]
185 showTypeCategory :: UniType -> Char
186 specMaybeTysSuffix :: [Labda UniType] -> _PackedString
187 specialiseTy :: UniType -> [Labda UniType] -> Int -> UniType
188 splitDictType :: UniType -> (Class, UniType)
189 splitForalls :: UniType -> ([TyVarTemplate], UniType)
190 splitTyArgs :: UniType -> ([UniType], UniType)
191 splitType :: UniType -> ([TyVarTemplate], [(Class, UniType)], UniType)
192 splitTypeWithDictsAsArgs :: UniType -> ([TyVarTemplate], [UniType], UniType)
193 typeMaybeString :: Labda UniType -> [_PackedString]
194 unDictifyTy :: UniType -> UniType
195 alpha :: UniType
196 alpha_ty :: UniType
197 beta :: UniType
198 beta_ty :: UniType
199 cmpUniType :: Bool -> UniType -> UniType -> Int#
200 delta :: UniType
201 delta_ty :: UniType
202 epsilon :: UniType
203 epsilon_ty :: UniType
204 gamma :: UniType
205 gamma_ty :: UniType
206 instantiateTauTy :: [(TyVarTemplate, UniType)] -> UniType -> UniType
207 instantiateThetaTy :: [(TyVarTemplate, UniType)] -> [(Class, UniType)] -> [(Class, UniType)]
208 instantiateTy :: [(TyVarTemplate, UniType)] -> UniType -> UniType
209 mkDictTy :: Class -> UniType -> UniType
210 mkForallTy :: [TyVarTemplate] -> UniType -> UniType
211 mkRhoTy :: [(Class, UniType)] -> UniType -> UniType
212 mkSigmaTy :: [TyVarTemplate] -> [(Class, UniType)] -> UniType -> UniType
213 mkTyVarTemplateTy :: TyVarTemplate -> UniType
214 mkTyVarTy :: TyVar -> UniType
215 quantifyTy :: [TyVar] -> UniType -> ([TyVarTemplate], UniType)
216 instance Eq Class
217 instance Eq ClassOp
218 instance Eq TyCon
219 instance Eq TyVar
220 instance Eq TyVarTemplate
221 instance Eq UniType
222 instance Eq Unique
223 instance Ord Class
224 instance Ord ClassOp
225 instance Ord TyCon
226 instance Ord TyVar
227 instance Ord TyVarTemplate
228 instance Ord Unique
229 instance NamedThing Class
230 instance NamedThing FullName
231 instance NamedThing ShortName
232 instance NamedThing TyCon
233 instance NamedThing TyVar
234 instance NamedThing TyVarTemplate
235 instance Outputable Class
236 instance Outputable ClassOp
237 instance Outputable FullName
238 instance Outputable ShortName
239 instance Outputable TyCon
240 instance Outputable TyVar
241 instance Outputable TyVarTemplate
242 instance Outputable UniType
243 instance Text Unique
244