2 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1995
4 \section[AbsUniType]{@AbsUniType@: the abstract interface to @UniType@}
6 The module @AbsUniType@ is the ``outside world's'' interface to the
7 @UniType@ datatype. It imports and re-exports the appropriate
10 The prototype compiler's lack of original namery means it is good to
11 include @Class@, @TyVar@ and @TyCon@ stuff here, too, and to let this
12 module also present the ``outside-world'' interface for them.
15 #include "HsVersions.h"
18 -- Class and ClassOp stuff -------------------------------------
21 getClassKey, getClassOps,
22 getSuperDictSelId, getClassOpId, getDefaultMethodId,
24 getClassSig, getClassBigSig, getClassInstEnv,
25 --UNUSED: getClassDefaultMethodsInfo,
29 isNumericClass, isStandardClass, -- UNUSED: isDerivableClass,
33 getClassOpTag, getClassOpString,
34 --UNUSED: getClassOpSig,
37 -- TyVar stuff -------------------------------------------------
41 mkUserTyVar, mkPolySysTyVar, mkOpenSysTyVar,
42 --UNUSED: mkPrimSysTyVar, isPrimTyVar,
46 cmpTyVar, eqTyVar, ltTyVar, -- used a lot!
48 mkUserTyVarTemplate, mkSysTyVarTemplate, mkTemplateTyVars,
50 cloneTyVarFromTemplate,
52 instantiateTyVarTemplates,
54 -- a supply of template tyvars
56 alpha_tv, beta_tv, gamma_tv, delta_tv, epsilon_tv, -- templates
57 alpha_tyvar, beta_tyvar, gamma_tyvar, delta_tyvar, epsilon_tyvar,-- real tyvars
59 -- TyCon stuff -------------------------------------------------
61 Arity(..), -- synonym for Int
62 mkSynonymTyCon, mkDataTyCon, mkTupleTyCon,
63 mkPrimTyCon, mkSpecTyCon,
65 mkProcessorTyCon, mkPodizedPodTyCon,
66 #endif {- Data Parallel Haskell -}
68 isSynTyCon, isVisibleSynTyCon, isDataTyCon,
69 isPrimTyCon, isBoxedTyCon,
70 maybeCharLikeTyCon, maybeIntLikeTyCon,
71 maybeFloatLikeTyCon, maybeDoubleLikeTyCon,
72 isEnumerationTyCon, --UNUSED: isEnumerationTyConMostly,
74 isLocalSpecTyCon, isLocalGenTyCon, isBigTupleTyCon,
75 maybeSingleConstructorTyCon,
76 derivedFor, --UNUSED: preludeClassDerivedFor,
79 getTyConArity, getTyConDataCons,
80 getTyConTyVarTemplates,
85 -- UniType stuff -----------------------------------------------
89 SigmaType(..), RhoType(..), TauType(..),
90 ThetaType(..), -- synonym for [(Class,UniType)]
93 mkTyVarTy, mkTyVarTemplateTy, mkDictTy,
94 -- use applyTyCon to make UniDatas, UniSyns
95 mkRhoTy, mkForallTy, mkSigmaTy, -- ToDo: perhaps nuke one?
97 -- QUANTIFICATION & INSTANTIATION
99 instantiateTy, instantiateTauTy, instantiateThetaTy,
101 -- COMPARISON (use sparingly!)
105 -- PRE-BUILT TYPES (for Prelude)
106 alpha, beta, gamma, delta, epsilon, -- these have templates in them
107 alpha_ty, beta_ty, gamma_ty, delta_ty, epsilon_ty, -- these have tyvars in them
109 -- UniTyFuns stuff ---------------------------------------------
111 applyTy, applyTyCon, applySynTyCon, applyNonSynTyCon,
112 glueTyArgs, mkSuperDictSelType, --UNUSED: mkDictFunType,
116 --not exported: expandTySyns,
118 getTyVar, getTyVarMaybe, getTyVarTemplateMaybe,
119 splitType, splitForalls, getTauType, splitTyArgs,
120 splitTypeWithDictsAsArgs,
121 --not exported/unused: sourceTypes, targetType,
125 getUniDataTyCon, getUniDataTyCon_maybe,
126 getUniDataSpecTyCon, getUniDataSpecTyCon_maybe,
129 #ifdef USE_SEMANTIQUE_STRANAL
131 #endif {- Semantique strictness analyser -}
132 getMentionedTyConsAndClassesFromUniType,
133 getMentionedTyConsAndClassesFromTyCon,
134 getMentionedTyConsAndClassesFromClass,
137 -- FREE-VARIABLE EXTRACTION
138 extractTyVarsFromTy, extractTyVarsFromTys,
139 extractTyVarTemplatesFromTy,
142 isTyVarTy, isTyVarTemplateTy,
143 maybeUnpackFunTy, isFunType,
144 isPrimType, isUnboxedDataType, --UNUSED: isDataConType,
147 --UNUSED: hasHigherOrderArg,
148 isDictTy, isGroundTy, isGroundOrTyVarTy,
150 --UNUSED: isSynTarget,
152 maybePurelyLocalTyCon, maybePurelyLocalClass,
153 maybePurelyLocalType,
154 returnsRealWorld, -- HACK courtesy of SLPJ
159 getPodizedPodDimension,
160 runtimeUnpodizableType,
161 #endif {- Data Parallel Haskell -}
164 applyTypeEnvToTy, applyTypeEnvToThetaTy,
165 --not exported: applyTypeEnvToTauTy,
167 -- genInstantiateTyUS, -- ToDo: ???
169 -- PRETTY PRINTING AND FORCING
170 pprUniType, pprParendUniType, pprMaybeTy,
171 pprTyCon, pprIfaceClass, pprClassOp,
179 matchTy, -- UNUSED: matchTys,
181 -- and, finally, stuff to make the interface self-contained...
182 -- Outputable(..), NamedThing(..),
183 ExportFlag, Pretty(..), PprStyle, PrettyRep,
185 GlobalSwitch, UnfoldingDetails, Id, DataCon(..), IdEnv(..),
186 InstTemplate, Maybe, Name, FullName, ShortName,
187 PrimKind, TyVarEnv(..), TypeEnv(..), Unique, ClassInstEnv(..),
188 MatchEnv(..), InstTyEnv(..), UniqFM, Bag
190 IF_ATTACK_PRAGMAS(COMMA assocMaybe)
192 #ifndef __GLASGOW_HASKELL__
203 import AbsSyn ( RenamedBinds(..), RenamedExpr(..), RenamedGRHS(..),
204 RenamedGRHSsAndBinds(..), RenamedPat(..), Binds,
205 Expr, GRHS, GRHSsAndBinds, InPat
207 import InstEnv ( ClassInstEnv(..), MatchEnv(..) )
208 import Maybes ( assocMaybe, Maybe(..) ) -- (..) for pragmas only
209 import NameTypes ( ShortName, FullName ) -- pragmas only
211 import Pretty ( Pretty(..)
212 IF_ATTACK_PRAGMAS(COMMA ppStr COMMA ppDouble COMMA ppInteger)
214 import TyVarEnv -- ( TyVarEnv )
215 import Unique ( Unique, UniqueSupply )
216 #if USE_ATTACK_PRAGMAS
219 #ifndef __GLASGOW_HASKELL__