| 1 | % |
|---|
| 2 | % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 |
|---|
| 3 | % |
|---|
| 4 | \section[PrelNames]{Definitions of prelude modules and names} |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | Nota Bene: all Names defined in here should come from the base package |
|---|
| 8 | |
|---|
| 9 | - ModuleNames for prelude modules, |
|---|
| 10 | e.g. pREL_BASE_Name :: ModuleName |
|---|
| 11 | |
|---|
| 12 | - Modules for prelude modules |
|---|
| 13 | e.g. pREL_Base :: Module |
|---|
| 14 | |
|---|
| 15 | - Uniques for Ids, DataCons, TyCons and Classes that the compiler |
|---|
| 16 | "knows about" in some way |
|---|
| 17 | e.g. intTyConKey :: Unique |
|---|
| 18 | minusClassOpKey :: Unique |
|---|
| 19 | |
|---|
| 20 | - Names for Ids, DataCons, TyCons and Classes that the compiler |
|---|
| 21 | "knows about" in some way |
|---|
| 22 | e.g. intTyConName :: Name |
|---|
| 23 | minusName :: Name |
|---|
| 24 | One of these Names contains |
|---|
| 25 | (a) the module and occurrence name of the thing |
|---|
| 26 | (b) its Unique |
|---|
| 27 | The may way the compiler "knows about" one of these things is |
|---|
| 28 | where the type checker or desugarer needs to look it up. For |
|---|
| 29 | example, when desugaring list comprehensions the desugarer |
|---|
| 30 | needs to conjure up 'foldr'. It does this by looking up |
|---|
| 31 | foldrName in the environment. |
|---|
| 32 | |
|---|
| 33 | - RdrNames for Ids, DataCons etc that the compiler may emit into |
|---|
| 34 | generated code (e.g. for deriving). It's not necessary to know |
|---|
| 35 | the uniques for these guys, only their names |
|---|
| 36 | |
|---|
| 37 | |
|---|
| 38 | Note [Known-key names] |
|---|
| 39 | ~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 40 | |
|---|
| 41 | It is *very* important that the compiler gives wired-in things and things with "known-key" names |
|---|
| 42 | the correct Uniques wherever they occur. We have to be careful about this in exactly two places: |
|---|
| 43 | |
|---|
| 44 | 1. When we parse some source code, renaming the AST better yield an AST whose Names have the |
|---|
| 45 | correct uniques |
|---|
| 46 | |
|---|
| 47 | 2. When we read an interface file, the read-in gubbins better have the right uniques |
|---|
| 48 | |
|---|
| 49 | This is accomplished through a combination of mechanisms: |
|---|
| 50 | |
|---|
| 51 | 1. When parsing source code, the RdrName-decorated AST has some RdrNames which are Exact. These are |
|---|
| 52 | wired-in RdrNames where the we could directly tell from the parsed syntax what Name to use. For |
|---|
| 53 | example, when we parse a [] in a type we can just insert an Exact RdrName Name with the listTyConKey. |
|---|
| 54 | |
|---|
| 55 | Currently, I believe this is just an optimisation: it would be equally valid to just output Orig |
|---|
| 56 | RdrNames that correctly record the module etc we expect the final Name to come from. However, |
|---|
| 57 | were we to eliminate isTupleOcc_maybe it would become essential (see point 3). |
|---|
| 58 | |
|---|
| 59 | 2. The knownKeyNames (which consist of the basicKnownKeyNames from the module, and those names reachable |
|---|
| 60 | via the wired-in stuff from TysWiredIn) are used to initialise the "original name cache" in IfaceEnv. |
|---|
| 61 | This initialization ensures that when the type checker or renamer (both of which use IfaceEnv) look up |
|---|
| 62 | an original name (i.e. a pair of a Module and an OccName) for a known-key name they get the correct Unique. |
|---|
| 63 | |
|---|
| 64 | This is the most important mechanism for ensuring that known-key stuff gets the right Unique, and is why |
|---|
| 65 | it is so important to place your known-key names in the appropriate lists. |
|---|
| 66 | |
|---|
| 67 | 3. For "infinite families" of known-key names (i.e. tuples, Any tycons and implicit parameter TyCons), we |
|---|
| 68 | have to be extra careful. Because there are an infinite number of these things, we cannot add them to |
|---|
| 69 | the list of known-key names used to initialise the original name cache. Instead, we have to rely on |
|---|
| 70 | never having to look them up in that cache. |
|---|
| 71 | |
|---|
| 72 | This is accomplished through a variety of mechanisms: |
|---|
| 73 | |
|---|
| 74 | a) The known infinite families of names are specially serialised by BinIface.putName, with that special treatment |
|---|
| 75 | detected when we read back to ensure that we get back to the correct uniques. |
|---|
| 76 | |
|---|
| 77 | b) Most of the infinite families cannot occur in source code, so mechanism a) sufficies to ensure that they |
|---|
| 78 | always have the right Unique. In particular, implicit param TyCon names, constraint tuples and Any TyCons |
|---|
| 79 | cannot be mentioned by the user. |
|---|
| 80 | |
|---|
| 81 | c) Tuple TyCon/DataCon names have a special hack (isTupleOcc_maybe) that is used by the original name cache |
|---|
| 82 | lookup routine to detect tuple names and give them the right Unique. You might think that this is unnecessary |
|---|
| 83 | because tuple TyCon/DataCons are parsed as Exact RdrNames and *don't* appear as original names in interface files |
|---|
| 84 | (because serialization gives them special treatment), so we will never look them up in the original name cache. |
|---|
| 85 | |
|---|
| 86 | However, there is a subtle reason why this is not the case: if you use setRdrNameSpace on an Exact RdrName |
|---|
| 87 | it may be turned into an Orig RdrName. So if the original name was an Exact tuple Name we might end up with |
|---|
| 88 | an Orig instead, which *will* lead to an original name cache query. |
|---|
| 89 | \begin{code} |
|---|
| 90 | module PrelNames ( |
|---|
| 91 | Unique, Uniquable(..), hasKey, -- Re-exported for convenience |
|---|
| 92 | |
|---|
| 93 | ----------------------------------------------------------- |
|---|
| 94 | module PrelNames, -- A huge bunch of (a) Names, e.g. intTyConName |
|---|
| 95 | -- (b) Uniques e.g. intTyConKey |
|---|
| 96 | -- (c) Groups of classes and types |
|---|
| 97 | -- (d) miscellaneous things |
|---|
| 98 | -- So many that we export them all |
|---|
| 99 | ) where |
|---|
| 100 | |
|---|
| 101 | #include "HsVersions.h" |
|---|
| 102 | |
|---|
| 103 | import Module |
|---|
| 104 | import OccName |
|---|
| 105 | import RdrName |
|---|
| 106 | import Unique |
|---|
| 107 | import BasicTypes |
|---|
| 108 | import Name |
|---|
| 109 | import SrcLoc |
|---|
| 110 | import FastString |
|---|
| 111 | \end{code} |
|---|
| 112 | |
|---|
| 113 | |
|---|
| 114 | %************************************************************************ |
|---|
| 115 | %* * |
|---|
| 116 | \subsection{Local Names} |
|---|
| 117 | %* * |
|---|
| 118 | %************************************************************************ |
|---|
| 119 | |
|---|
| 120 | This *local* name is used by the interactive stuff |
|---|
| 121 | |
|---|
| 122 | \begin{code} |
|---|
| 123 | itName :: Unique -> SrcSpan -> Name |
|---|
| 124 | itName uniq loc = mkInternalName uniq (mkOccNameFS varName (fsLit "it")) loc |
|---|
| 125 | \end{code} |
|---|
| 126 | |
|---|
| 127 | \begin{code} |
|---|
| 128 | -- mkUnboundName makes a place-holder Name; it shouldn't be looked at except possibly |
|---|
| 129 | -- during compiler debugging. |
|---|
| 130 | mkUnboundName :: RdrName -> Name |
|---|
| 131 | mkUnboundName rdr_name = mkInternalName unboundKey (rdrNameOcc rdr_name) noSrcSpan |
|---|
| 132 | |
|---|
| 133 | isUnboundName :: Name -> Bool |
|---|
| 134 | isUnboundName name = name `hasKey` unboundKey |
|---|
| 135 | \end{code} |
|---|
| 136 | |
|---|
| 137 | |
|---|
| 138 | %************************************************************************ |
|---|
| 139 | %* * |
|---|
| 140 | \subsection{Known key Names} |
|---|
| 141 | %* * |
|---|
| 142 | %************************************************************************ |
|---|
| 143 | |
|---|
| 144 | This section tells what the compiler knows about the association of |
|---|
| 145 | names with uniques. These ones are the *non* wired-in ones. The |
|---|
| 146 | wired in ones are defined in TysWiredIn etc. |
|---|
| 147 | |
|---|
| 148 | The names for DPH can come from one of multiple backend packages. At the point where |
|---|
| 149 | 'basicKnownKeyNames' is used, we don't know which backend it will be. Hence, we list |
|---|
| 150 | the names for multiple backends. That works out fine, although they use the same uniques, |
|---|
| 151 | as we are guaranteed to only load one backend; hence, only one of the different names |
|---|
| 152 | sharing a unique will be used. |
|---|
| 153 | |
|---|
| 154 | \begin{code} |
|---|
| 155 | basicKnownKeyNames :: [Name] |
|---|
| 156 | basicKnownKeyNames |
|---|
| 157 | = genericTyConNames |
|---|
| 158 | ++ typeableClassNames |
|---|
| 159 | ++ [ -- Type constructors (synonyms especially) |
|---|
| 160 | ioTyConName, ioDataConName, |
|---|
| 161 | runMainIOName, |
|---|
| 162 | rationalTyConName, |
|---|
| 163 | stringTyConName, |
|---|
| 164 | ratioDataConName, |
|---|
| 165 | ratioTyConName, |
|---|
| 166 | integerTyConName, |
|---|
| 167 | |
|---|
| 168 | -- Classes. *Must* include: |
|---|
| 169 | -- classes that are grabbed by key (e.g., eqClassKey) |
|---|
| 170 | -- classes in "Class.standardClassKeys" (quite a few) |
|---|
| 171 | eqClassName, -- mentioned, derivable |
|---|
| 172 | ordClassName, -- derivable |
|---|
| 173 | boundedClassName, -- derivable |
|---|
| 174 | numClassName, -- mentioned, numeric |
|---|
| 175 | enumClassName, -- derivable |
|---|
| 176 | monadClassName, |
|---|
| 177 | functorClassName, |
|---|
| 178 | realClassName, -- numeric |
|---|
| 179 | integralClassName, -- numeric |
|---|
| 180 | fractionalClassName, -- numeric |
|---|
| 181 | floatingClassName, -- numeric |
|---|
| 182 | realFracClassName, -- numeric |
|---|
| 183 | realFloatClassName, -- numeric |
|---|
| 184 | dataClassName, |
|---|
| 185 | isStringClassName, |
|---|
| 186 | applicativeClassName, |
|---|
| 187 | foldableClassName, |
|---|
| 188 | traversableClassName, |
|---|
| 189 | |
|---|
| 190 | -- Numeric stuff |
|---|
| 191 | negateName, minusName, geName, eqName, |
|---|
| 192 | |
|---|
| 193 | -- Conversion functions |
|---|
| 194 | fromRationalName, fromIntegerName, |
|---|
| 195 | toIntegerName, toRationalName, |
|---|
| 196 | fromIntegralName, realToFracName, |
|---|
| 197 | |
|---|
| 198 | -- String stuff |
|---|
| 199 | fromStringName, |
|---|
| 200 | |
|---|
| 201 | -- Enum stuff |
|---|
| 202 | enumFromName, enumFromThenName, |
|---|
| 203 | enumFromThenToName, enumFromToName, |
|---|
| 204 | |
|---|
| 205 | -- Monad stuff |
|---|
| 206 | thenIOName, bindIOName, returnIOName, failIOName, |
|---|
| 207 | failMName, bindMName, thenMName, returnMName, |
|---|
| 208 | fmapName, |
|---|
| 209 | |
|---|
| 210 | -- MonadRec stuff |
|---|
| 211 | mfixName, |
|---|
| 212 | |
|---|
| 213 | -- Arrow stuff |
|---|
| 214 | arrAName, composeAName, firstAName, |
|---|
| 215 | appAName, choiceAName, loopAName, |
|---|
| 216 | |
|---|
| 217 | -- Ix stuff |
|---|
| 218 | ixClassName, |
|---|
| 219 | |
|---|
| 220 | -- Show stuff |
|---|
| 221 | showClassName, |
|---|
| 222 | |
|---|
| 223 | -- Read stuff |
|---|
| 224 | readClassName, |
|---|
| 225 | |
|---|
| 226 | -- Stable pointers |
|---|
| 227 | newStablePtrName, |
|---|
| 228 | |
|---|
| 229 | -- GHC Extensions |
|---|
| 230 | groupWithName, |
|---|
| 231 | |
|---|
| 232 | -- Strings and lists |
|---|
| 233 | unpackCStringName, |
|---|
| 234 | unpackCStringFoldrName, unpackCStringUtf8Name, |
|---|
| 235 | |
|---|
| 236 | -- List operations |
|---|
| 237 | concatName, filterName, mapName, |
|---|
| 238 | zipName, foldrName, buildName, augmentName, appendName, |
|---|
| 239 | |
|---|
| 240 | dollarName, -- The ($) apply function |
|---|
| 241 | |
|---|
| 242 | -- FFI primitive types that are not wired-in. |
|---|
| 243 | stablePtrTyConName, ptrTyConName, funPtrTyConName, |
|---|
| 244 | int8TyConName, int16TyConName, int32TyConName, int64TyConName, |
|---|
| 245 | wordTyConName, word8TyConName, word16TyConName, word32TyConName, word64TyConName, |
|---|
| 246 | |
|---|
| 247 | -- Others |
|---|
| 248 | otherwiseIdName, inlineIdName, |
|---|
| 249 | eqStringName, assertName, breakpointName, breakpointCondName, |
|---|
| 250 | breakpointAutoName, opaqueTyConName, |
|---|
| 251 | assertErrorName, runSTRepName, |
|---|
| 252 | printName, fstName, sndName, |
|---|
| 253 | |
|---|
| 254 | -- Integer |
|---|
| 255 | integerTyConName, mkIntegerName, |
|---|
| 256 | integerToWord64Name, integerToInt64Name, |
|---|
| 257 | plusIntegerName, timesIntegerName, smallIntegerName, |
|---|
| 258 | integerToWordName, integerToIntName, minusIntegerName, |
|---|
| 259 | negateIntegerName, eqIntegerName, neqIntegerName, |
|---|
| 260 | absIntegerName, signumIntegerName, |
|---|
| 261 | leIntegerName, gtIntegerName, ltIntegerName, geIntegerName, |
|---|
| 262 | compareIntegerName, quotRemIntegerName, divModIntegerName, |
|---|
| 263 | quotIntegerName, remIntegerName, |
|---|
| 264 | floatFromIntegerName, doubleFromIntegerName, |
|---|
| 265 | encodeFloatIntegerName, encodeDoubleIntegerName, |
|---|
| 266 | gcdIntegerName, lcmIntegerName, |
|---|
| 267 | andIntegerName, orIntegerName, xorIntegerName, complementIntegerName, |
|---|
| 268 | shiftLIntegerName, shiftRIntegerName, |
|---|
| 269 | |
|---|
| 270 | -- MonadFix |
|---|
| 271 | monadFixClassName, mfixName, |
|---|
| 272 | |
|---|
| 273 | -- Other classes |
|---|
| 274 | randomClassName, randomGenClassName, monadPlusClassName, |
|---|
| 275 | |
|---|
| 276 | -- Type-level naturals |
|---|
| 277 | typeNatKindConName, |
|---|
| 278 | typeStringKindConName, |
|---|
| 279 | singIClassName, |
|---|
| 280 | typeNatLeqClassName, |
|---|
| 281 | typeNatAddTyFamName, |
|---|
| 282 | typeNatMulTyFamName, |
|---|
| 283 | typeNatExpTyFamName, |
|---|
| 284 | |
|---|
| 285 | -- Annotation type checking |
|---|
| 286 | toAnnotationWrapperName |
|---|
| 287 | |
|---|
| 288 | -- The Ordering type |
|---|
| 289 | , orderingTyConName, ltDataConName, eqDataConName, gtDataConName |
|---|
| 290 | |
|---|
| 291 | -- The Either type |
|---|
| 292 | , eitherTyConName, leftDataConName, rightDataConName |
|---|
| 293 | |
|---|
| 294 | -- Plugins |
|---|
| 295 | , pluginTyConName |
|---|
| 296 | |
|---|
| 297 | -- dotnet interop |
|---|
| 298 | , objectTyConName, marshalObjectName, unmarshalObjectName |
|---|
| 299 | , marshalStringName, unmarshalStringName, checkDotnetResName |
|---|
| 300 | |
|---|
| 301 | -- Generics |
|---|
| 302 | , genClassName, gen1ClassName |
|---|
| 303 | , datatypeClassName, constructorClassName, selectorClassName |
|---|
| 304 | |
|---|
| 305 | -- Monad comprehensions |
|---|
| 306 | , guardMName |
|---|
| 307 | , liftMName |
|---|
| 308 | , mzipName |
|---|
| 309 | |
|---|
| 310 | -- GHCi Sandbox |
|---|
| 311 | , ghciIoClassName, ghciStepIoMName |
|---|
| 312 | ] |
|---|
| 313 | |
|---|
| 314 | genericTyConNames :: [Name] |
|---|
| 315 | genericTyConNames = [ |
|---|
| 316 | v1TyConName, u1TyConName, par1TyConName, rec1TyConName, |
|---|
| 317 | k1TyConName, m1TyConName, sumTyConName, prodTyConName, |
|---|
| 318 | compTyConName, rTyConName, pTyConName, dTyConName, |
|---|
| 319 | cTyConName, sTyConName, rec0TyConName, par0TyConName, |
|---|
| 320 | d1TyConName, c1TyConName, s1TyConName, noSelTyConName, |
|---|
| 321 | repTyConName, rep1TyConName |
|---|
| 322 | ] |
|---|
| 323 | \end{code} |
|---|
| 324 | |
|---|
| 325 | |
|---|
| 326 | %************************************************************************ |
|---|
| 327 | %* * |
|---|
| 328 | \subsection{Module names} |
|---|
| 329 | %* * |
|---|
| 330 | %************************************************************************ |
|---|
| 331 | |
|---|
| 332 | |
|---|
| 333 | --MetaHaskell Extension Add a new module here |
|---|
| 334 | \begin{code} |
|---|
| 335 | pRELUDE :: Module |
|---|
| 336 | pRELUDE = mkBaseModule_ pRELUDE_NAME |
|---|
| 337 | |
|---|
| 338 | gHC_PRIM, gHC_TYPES, gHC_GENERICS, |
|---|
| 339 | gHC_MAGIC, |
|---|
| 340 | gHC_CLASSES, gHC_BASE, gHC_ENUM, gHC_GHCI, gHC_CSTRING, |
|---|
| 341 | gHC_SHOW, gHC_READ, gHC_NUM, gHC_INTEGER_TYPE, gHC_LIST, |
|---|
| 342 | gHC_TUPLE, dATA_TUPLE, dATA_EITHER, dATA_STRING, dATA_FOLDABLE, dATA_TRAVERSABLE, |
|---|
| 343 | gHC_CONC, gHC_IO, gHC_IO_Exception, |
|---|
| 344 | gHC_ST, gHC_ARR, gHC_STABLE, gHC_PTR, gHC_ERR, gHC_REAL, |
|---|
| 345 | gHC_FLOAT, gHC_TOP_HANDLER, sYSTEM_IO, dYNAMIC, tYPEABLE, tYPEABLE_INTERNAL, gENERICS, |
|---|
| 346 | dOTNET, rEAD_PREC, lEX, gHC_INT, gHC_WORD, mONAD, mONAD_FIX, mONAD_ZIP, |
|---|
| 347 | aRROW, cONTROL_APPLICATIVE, gHC_DESUGAR, rANDOM, gHC_EXTS, |
|---|
| 348 | cONTROL_EXCEPTION_BASE, gHC_TYPELITS :: Module |
|---|
| 349 | |
|---|
| 350 | gHC_PRIM = mkPrimModule (fsLit "GHC.Prim") -- Primitive types and values |
|---|
| 351 | gHC_TYPES = mkPrimModule (fsLit "GHC.Types") |
|---|
| 352 | gHC_GENERICS = mkPrimModule (fsLit "GHC.Generics") |
|---|
| 353 | gHC_MAGIC = mkPrimModule (fsLit "GHC.Magic") |
|---|
| 354 | gHC_CSTRING = mkPrimModule (fsLit "GHC.CString") |
|---|
| 355 | gHC_CLASSES = mkPrimModule (fsLit "GHC.Classes") |
|---|
| 356 | |
|---|
| 357 | gHC_BASE = mkBaseModule (fsLit "GHC.Base") |
|---|
| 358 | gHC_ENUM = mkBaseModule (fsLit "GHC.Enum") |
|---|
| 359 | gHC_GHCI = mkBaseModule (fsLit "GHC.GHCi") |
|---|
| 360 | gHC_SHOW = mkBaseModule (fsLit "GHC.Show") |
|---|
| 361 | gHC_READ = mkBaseModule (fsLit "GHC.Read") |
|---|
| 362 | gHC_NUM = mkBaseModule (fsLit "GHC.Num") |
|---|
| 363 | gHC_INTEGER_TYPE= mkIntegerModule (fsLit "GHC.Integer.Type") |
|---|
| 364 | gHC_LIST = mkBaseModule (fsLit "GHC.List") |
|---|
| 365 | gHC_TUPLE = mkPrimModule (fsLit "GHC.Tuple") |
|---|
| 366 | dATA_TUPLE = mkBaseModule (fsLit "Data.Tuple") |
|---|
| 367 | dATA_EITHER = mkBaseModule (fsLit "Data.Either") |
|---|
| 368 | dATA_STRING = mkBaseModule (fsLit "Data.String") |
|---|
| 369 | dATA_FOLDABLE = mkBaseModule (fsLit "Data.Foldable") |
|---|
| 370 | dATA_TRAVERSABLE= mkBaseModule (fsLit "Data.Traversable") |
|---|
| 371 | gHC_CONC = mkBaseModule (fsLit "GHC.Conc") |
|---|
| 372 | gHC_IO = mkBaseModule (fsLit "GHC.IO") |
|---|
| 373 | gHC_IO_Exception = mkBaseModule (fsLit "GHC.IO.Exception") |
|---|
| 374 | gHC_ST = mkBaseModule (fsLit "GHC.ST") |
|---|
| 375 | gHC_ARR = mkBaseModule (fsLit "GHC.Arr") |
|---|
| 376 | gHC_STABLE = mkBaseModule (fsLit "GHC.Stable") |
|---|
| 377 | gHC_PTR = mkBaseModule (fsLit "GHC.Ptr") |
|---|
| 378 | gHC_ERR = mkBaseModule (fsLit "GHC.Err") |
|---|
| 379 | gHC_REAL = mkBaseModule (fsLit "GHC.Real") |
|---|
| 380 | gHC_FLOAT = mkBaseModule (fsLit "GHC.Float") |
|---|
| 381 | gHC_TOP_HANDLER = mkBaseModule (fsLit "GHC.TopHandler") |
|---|
| 382 | sYSTEM_IO = mkBaseModule (fsLit "System.IO") |
|---|
| 383 | dYNAMIC = mkBaseModule (fsLit "Data.Dynamic") |
|---|
| 384 | tYPEABLE = mkBaseModule (fsLit "Data.Typeable") |
|---|
| 385 | tYPEABLE_INTERNAL = mkBaseModule (fsLit "Data.Typeable.Internal") |
|---|
| 386 | gENERICS = mkBaseModule (fsLit "Data.Data") |
|---|
| 387 | dOTNET = mkBaseModule (fsLit "GHC.Dotnet") |
|---|
| 388 | rEAD_PREC = mkBaseModule (fsLit "Text.ParserCombinators.ReadPrec") |
|---|
| 389 | lEX = mkBaseModule (fsLit "Text.Read.Lex") |
|---|
| 390 | gHC_INT = mkBaseModule (fsLit "GHC.Int") |
|---|
| 391 | gHC_WORD = mkBaseModule (fsLit "GHC.Word") |
|---|
| 392 | mONAD = mkBaseModule (fsLit "Control.Monad") |
|---|
| 393 | mONAD_FIX = mkBaseModule (fsLit "Control.Monad.Fix") |
|---|
| 394 | mONAD_ZIP = mkBaseModule (fsLit "Control.Monad.Zip") |
|---|
| 395 | aRROW = mkBaseModule (fsLit "Control.Arrow") |
|---|
| 396 | cONTROL_APPLICATIVE = mkBaseModule (fsLit "Control.Applicative") |
|---|
| 397 | gHC_DESUGAR = mkBaseModule (fsLit "GHC.Desugar") |
|---|
| 398 | rANDOM = mkBaseModule (fsLit "System.Random") |
|---|
| 399 | gHC_EXTS = mkBaseModule (fsLit "GHC.Exts") |
|---|
| 400 | cONTROL_EXCEPTION_BASE = mkBaseModule (fsLit "Control.Exception.Base") |
|---|
| 401 | gHC_TYPELITS = mkBaseModule (fsLit "GHC.TypeLits") |
|---|
| 402 | |
|---|
| 403 | gHC_PARR' :: Module |
|---|
| 404 | gHC_PARR' = mkBaseModule (fsLit "GHC.PArr") |
|---|
| 405 | |
|---|
| 406 | mAIN, rOOT_MAIN :: Module |
|---|
| 407 | mAIN = mkMainModule_ mAIN_NAME |
|---|
| 408 | rOOT_MAIN = mkMainModule (fsLit ":Main") -- Root module for initialisation |
|---|
| 409 | |
|---|
| 410 | -- The ':xxx' makes a module name that the user can never |
|---|
| 411 | -- use himself. The z-encoding for ':' is "ZC", so the z-encoded |
|---|
| 412 | -- module name still starts with a capital letter, which keeps |
|---|
| 413 | -- the z-encoded version consistent. |
|---|
| 414 | iNTERACTIVE :: Module |
|---|
| 415 | iNTERACTIVE = mkMainModule (fsLit ":Interactive") |
|---|
| 416 | |
|---|
| 417 | pRELUDE_NAME, mAIN_NAME :: ModuleName |
|---|
| 418 | pRELUDE_NAME = mkModuleNameFS (fsLit "Prelude") |
|---|
| 419 | mAIN_NAME = mkModuleNameFS (fsLit "Main") |
|---|
| 420 | |
|---|
| 421 | dATA_ARRAY_PARALLEL_NAME, dATA_ARRAY_PARALLEL_PRIM_NAME :: ModuleName |
|---|
| 422 | dATA_ARRAY_PARALLEL_NAME = mkModuleNameFS (fsLit "Data.Array.Parallel") |
|---|
| 423 | dATA_ARRAY_PARALLEL_PRIM_NAME = mkModuleNameFS (fsLit "Data.Array.Parallel.Prim") |
|---|
| 424 | |
|---|
| 425 | mkPrimModule :: FastString -> Module |
|---|
| 426 | mkPrimModule m = mkModule primPackageId (mkModuleNameFS m) |
|---|
| 427 | |
|---|
| 428 | mkIntegerModule :: FastString -> Module |
|---|
| 429 | mkIntegerModule m = mkModule integerPackageId (mkModuleNameFS m) |
|---|
| 430 | |
|---|
| 431 | mkBaseModule :: FastString -> Module |
|---|
| 432 | mkBaseModule m = mkModule basePackageId (mkModuleNameFS m) |
|---|
| 433 | |
|---|
| 434 | mkBaseModule_ :: ModuleName -> Module |
|---|
| 435 | mkBaseModule_ m = mkModule basePackageId m |
|---|
| 436 | |
|---|
| 437 | mkThisGhcModule :: FastString -> Module |
|---|
| 438 | mkThisGhcModule m = mkModule thisGhcPackageId (mkModuleNameFS m) |
|---|
| 439 | |
|---|
| 440 | mkThisGhcModule_ :: ModuleName -> Module |
|---|
| 441 | mkThisGhcModule_ m = mkModule thisGhcPackageId m |
|---|
| 442 | |
|---|
| 443 | mkMainModule :: FastString -> Module |
|---|
| 444 | mkMainModule m = mkModule mainPackageId (mkModuleNameFS m) |
|---|
| 445 | |
|---|
| 446 | mkMainModule_ :: ModuleName -> Module |
|---|
| 447 | mkMainModule_ m = mkModule mainPackageId m |
|---|
| 448 | \end{code} |
|---|
| 449 | |
|---|
| 450 | %************************************************************************ |
|---|
| 451 | %* * |
|---|
| 452 | \subsection{Constructing the names of tuples |
|---|
| 453 | %* * |
|---|
| 454 | %************************************************************************ |
|---|
| 455 | |
|---|
| 456 | \begin{code} |
|---|
| 457 | mkTupleModule :: TupleSort -> Arity -> Module |
|---|
| 458 | mkTupleModule BoxedTuple _ = gHC_TUPLE |
|---|
| 459 | mkTupleModule ConstraintTuple _ = gHC_TUPLE |
|---|
| 460 | mkTupleModule UnboxedTuple _ = gHC_PRIM |
|---|
| 461 | \end{code} |
|---|
| 462 | |
|---|
| 463 | |
|---|
| 464 | %************************************************************************ |
|---|
| 465 | %* * |
|---|
| 466 | RdrNames |
|---|
| 467 | %* * |
|---|
| 468 | %************************************************************************ |
|---|
| 469 | |
|---|
| 470 | \begin{code} |
|---|
| 471 | main_RDR_Unqual :: RdrName |
|---|
| 472 | main_RDR_Unqual = mkUnqual varName (fsLit "main") |
|---|
| 473 | -- We definitely don't want an Orig RdrName, because |
|---|
| 474 | -- main might, in principle, be imported into module Main |
|---|
| 475 | |
|---|
| 476 | forall_tv_RDR, dot_tv_RDR :: RdrName |
|---|
| 477 | forall_tv_RDR = mkUnqual tvName (fsLit "forall") |
|---|
| 478 | dot_tv_RDR = mkUnqual tvName (fsLit ".") |
|---|
| 479 | |
|---|
| 480 | eq_RDR, ge_RDR, ne_RDR, le_RDR, lt_RDR, gt_RDR, compare_RDR, |
|---|
| 481 | ltTag_RDR, eqTag_RDR, gtTag_RDR :: RdrName |
|---|
| 482 | eq_RDR = nameRdrName eqName |
|---|
| 483 | ge_RDR = nameRdrName geName |
|---|
| 484 | ne_RDR = varQual_RDR gHC_CLASSES (fsLit "/=") |
|---|
| 485 | le_RDR = varQual_RDR gHC_CLASSES (fsLit "<=") |
|---|
| 486 | lt_RDR = varQual_RDR gHC_CLASSES (fsLit "<") |
|---|
| 487 | gt_RDR = varQual_RDR gHC_CLASSES (fsLit ">") |
|---|
| 488 | compare_RDR = varQual_RDR gHC_CLASSES (fsLit "compare") |
|---|
| 489 | ltTag_RDR = dataQual_RDR gHC_TYPES (fsLit "LT") |
|---|
| 490 | eqTag_RDR = dataQual_RDR gHC_TYPES (fsLit "EQ") |
|---|
| 491 | gtTag_RDR = dataQual_RDR gHC_TYPES (fsLit "GT") |
|---|
| 492 | |
|---|
| 493 | eqClass_RDR, numClass_RDR, ordClass_RDR, enumClass_RDR, monadClass_RDR |
|---|
| 494 | :: RdrName |
|---|
| 495 | eqClass_RDR = nameRdrName eqClassName |
|---|
| 496 | numClass_RDR = nameRdrName numClassName |
|---|
| 497 | ordClass_RDR = nameRdrName ordClassName |
|---|
| 498 | enumClass_RDR = nameRdrName enumClassName |
|---|
| 499 | monadClass_RDR = nameRdrName monadClassName |
|---|
| 500 | |
|---|
| 501 | map_RDR, append_RDR :: RdrName |
|---|
| 502 | map_RDR = varQual_RDR gHC_BASE (fsLit "map") |
|---|
| 503 | append_RDR = varQual_RDR gHC_BASE (fsLit "++") |
|---|
| 504 | |
|---|
| 505 | foldr_RDR, build_RDR, returnM_RDR, bindM_RDR, failM_RDR :: RdrName |
|---|
| 506 | foldr_RDR = nameRdrName foldrName |
|---|
| 507 | build_RDR = nameRdrName buildName |
|---|
| 508 | returnM_RDR = nameRdrName returnMName |
|---|
| 509 | bindM_RDR = nameRdrName bindMName |
|---|
| 510 | failM_RDR = nameRdrName failMName |
|---|
| 511 | |
|---|
| 512 | left_RDR, right_RDR :: RdrName |
|---|
| 513 | left_RDR = nameRdrName leftDataConName |
|---|
| 514 | right_RDR = nameRdrName rightDataConName |
|---|
| 515 | |
|---|
| 516 | fromEnum_RDR, toEnum_RDR :: RdrName |
|---|
| 517 | fromEnum_RDR = varQual_RDR gHC_ENUM (fsLit "fromEnum") |
|---|
| 518 | toEnum_RDR = varQual_RDR gHC_ENUM (fsLit "toEnum") |
|---|
| 519 | |
|---|
| 520 | enumFrom_RDR, enumFromTo_RDR, enumFromThen_RDR, enumFromThenTo_RDR :: RdrName |
|---|
| 521 | enumFrom_RDR = nameRdrName enumFromName |
|---|
| 522 | enumFromTo_RDR = nameRdrName enumFromToName |
|---|
| 523 | enumFromThen_RDR = nameRdrName enumFromThenName |
|---|
| 524 | enumFromThenTo_RDR = nameRdrName enumFromThenToName |
|---|
| 525 | |
|---|
| 526 | ratioDataCon_RDR, plusInteger_RDR, timesInteger_RDR :: RdrName |
|---|
| 527 | ratioDataCon_RDR = nameRdrName ratioDataConName |
|---|
| 528 | plusInteger_RDR = nameRdrName plusIntegerName |
|---|
| 529 | timesInteger_RDR = nameRdrName timesIntegerName |
|---|
| 530 | |
|---|
| 531 | ioDataCon_RDR :: RdrName |
|---|
| 532 | ioDataCon_RDR = nameRdrName ioDataConName |
|---|
| 533 | |
|---|
| 534 | eqString_RDR, unpackCString_RDR, unpackCStringFoldr_RDR, |
|---|
| 535 | unpackCStringUtf8_RDR :: RdrName |
|---|
| 536 | eqString_RDR = nameRdrName eqStringName |
|---|
| 537 | unpackCString_RDR = nameRdrName unpackCStringName |
|---|
| 538 | unpackCStringFoldr_RDR = nameRdrName unpackCStringFoldrName |
|---|
| 539 | unpackCStringUtf8_RDR = nameRdrName unpackCStringUtf8Name |
|---|
| 540 | |
|---|
| 541 | newStablePtr_RDR, wordDataCon_RDR :: RdrName |
|---|
| 542 | newStablePtr_RDR = nameRdrName newStablePtrName |
|---|
| 543 | wordDataCon_RDR = dataQual_RDR gHC_TYPES (fsLit "W#") |
|---|
| 544 | |
|---|
| 545 | bindIO_RDR, returnIO_RDR :: RdrName |
|---|
| 546 | bindIO_RDR = nameRdrName bindIOName |
|---|
| 547 | returnIO_RDR = nameRdrName returnIOName |
|---|
| 548 | |
|---|
| 549 | fromInteger_RDR, fromRational_RDR, minus_RDR, times_RDR, plus_RDR :: RdrName |
|---|
| 550 | fromInteger_RDR = nameRdrName fromIntegerName |
|---|
| 551 | fromRational_RDR = nameRdrName fromRationalName |
|---|
| 552 | minus_RDR = nameRdrName minusName |
|---|
| 553 | times_RDR = varQual_RDR gHC_NUM (fsLit "*") |
|---|
| 554 | plus_RDR = varQual_RDR gHC_NUM (fsLit "+") |
|---|
| 555 | |
|---|
| 556 | fromString_RDR :: RdrName |
|---|
| 557 | fromString_RDR = nameRdrName fromStringName |
|---|
| 558 | |
|---|
| 559 | compose_RDR :: RdrName |
|---|
| 560 | compose_RDR = varQual_RDR gHC_BASE (fsLit ".") |
|---|
| 561 | |
|---|
| 562 | not_RDR, getTag_RDR, succ_RDR, pred_RDR, minBound_RDR, maxBound_RDR, |
|---|
| 563 | and_RDR, range_RDR, inRange_RDR, index_RDR, |
|---|
| 564 | unsafeIndex_RDR, unsafeRangeSize_RDR :: RdrName |
|---|
| 565 | and_RDR = varQual_RDR gHC_CLASSES (fsLit "&&") |
|---|
| 566 | not_RDR = varQual_RDR gHC_CLASSES (fsLit "not") |
|---|
| 567 | getTag_RDR = varQual_RDR gHC_BASE (fsLit "getTag") |
|---|
| 568 | succ_RDR = varQual_RDR gHC_ENUM (fsLit "succ") |
|---|
| 569 | pred_RDR = varQual_RDR gHC_ENUM (fsLit "pred") |
|---|
| 570 | minBound_RDR = varQual_RDR gHC_ENUM (fsLit "minBound") |
|---|
| 571 | maxBound_RDR = varQual_RDR gHC_ENUM (fsLit "maxBound") |
|---|
| 572 | range_RDR = varQual_RDR gHC_ARR (fsLit "range") |
|---|
| 573 | inRange_RDR = varQual_RDR gHC_ARR (fsLit "inRange") |
|---|
| 574 | index_RDR = varQual_RDR gHC_ARR (fsLit "index") |
|---|
| 575 | unsafeIndex_RDR = varQual_RDR gHC_ARR (fsLit "unsafeIndex") |
|---|
| 576 | unsafeRangeSize_RDR = varQual_RDR gHC_ARR (fsLit "unsafeRangeSize") |
|---|
| 577 | |
|---|
| 578 | readList_RDR, readListDefault_RDR, readListPrec_RDR, readListPrecDefault_RDR, |
|---|
| 579 | readPrec_RDR, parens_RDR, choose_RDR, lexP_RDR :: RdrName |
|---|
| 580 | readList_RDR = varQual_RDR gHC_READ (fsLit "readList") |
|---|
| 581 | readListDefault_RDR = varQual_RDR gHC_READ (fsLit "readListDefault") |
|---|
| 582 | readListPrec_RDR = varQual_RDR gHC_READ (fsLit "readListPrec") |
|---|
| 583 | readListPrecDefault_RDR = varQual_RDR gHC_READ (fsLit "readListPrecDefault") |
|---|
| 584 | readPrec_RDR = varQual_RDR gHC_READ (fsLit "readPrec") |
|---|
| 585 | parens_RDR = varQual_RDR gHC_READ (fsLit "parens") |
|---|
| 586 | choose_RDR = varQual_RDR gHC_READ (fsLit "choose") |
|---|
| 587 | lexP_RDR = varQual_RDR gHC_READ (fsLit "lexP") |
|---|
| 588 | |
|---|
| 589 | punc_RDR, ident_RDR, symbol_RDR :: RdrName |
|---|
| 590 | punc_RDR = dataQual_RDR lEX (fsLit "Punc") |
|---|
| 591 | ident_RDR = dataQual_RDR lEX (fsLit "Ident") |
|---|
| 592 | symbol_RDR = dataQual_RDR lEX (fsLit "Symbol") |
|---|
| 593 | |
|---|
| 594 | step_RDR, alt_RDR, reset_RDR, prec_RDR :: RdrName |
|---|
| 595 | step_RDR = varQual_RDR rEAD_PREC (fsLit "step") |
|---|
| 596 | alt_RDR = varQual_RDR rEAD_PREC (fsLit "+++") |
|---|
| 597 | reset_RDR = varQual_RDR rEAD_PREC (fsLit "reset") |
|---|
| 598 | prec_RDR = varQual_RDR rEAD_PREC (fsLit "prec") |
|---|
| 599 | |
|---|
| 600 | showList_RDR, showList___RDR, showsPrec_RDR, showString_RDR, |
|---|
| 601 | showSpace_RDR, showParen_RDR :: RdrName |
|---|
| 602 | showList_RDR = varQual_RDR gHC_SHOW (fsLit "showList") |
|---|
| 603 | showList___RDR = varQual_RDR gHC_SHOW (fsLit "showList__") |
|---|
| 604 | showsPrec_RDR = varQual_RDR gHC_SHOW (fsLit "showsPrec") |
|---|
| 605 | showString_RDR = varQual_RDR gHC_SHOW (fsLit "showString") |
|---|
| 606 | showSpace_RDR = varQual_RDR gHC_SHOW (fsLit "showSpace") |
|---|
| 607 | showParen_RDR = varQual_RDR gHC_SHOW (fsLit "showParen") |
|---|
| 608 | |
|---|
| 609 | typeOf_RDR, mkTyCon_RDR, mkTyConApp_RDR :: RdrName |
|---|
| 610 | typeOf_RDR = varQual_RDR tYPEABLE_INTERNAL (fsLit "typeOf") |
|---|
| 611 | mkTyCon_RDR = varQual_RDR tYPEABLE_INTERNAL (fsLit "mkTyCon") |
|---|
| 612 | mkTyConApp_RDR = varQual_RDR tYPEABLE_INTERNAL (fsLit "mkTyConApp") |
|---|
| 613 | |
|---|
| 614 | undefined_RDR :: RdrName |
|---|
| 615 | undefined_RDR = varQual_RDR gHC_ERR (fsLit "undefined") |
|---|
| 616 | |
|---|
| 617 | error_RDR :: RdrName |
|---|
| 618 | error_RDR = varQual_RDR gHC_ERR (fsLit "error") |
|---|
| 619 | |
|---|
| 620 | -- Generics (constructors and functions) |
|---|
| 621 | u1DataCon_RDR, par1DataCon_RDR, rec1DataCon_RDR, |
|---|
| 622 | k1DataCon_RDR, m1DataCon_RDR, l1DataCon_RDR, r1DataCon_RDR, |
|---|
| 623 | prodDataCon_RDR, comp1DataCon_RDR, from_RDR, from1_RDR, |
|---|
| 624 | to_RDR, to1_RDR, datatypeName_RDR, moduleName_RDR, conName_RDR, |
|---|
| 625 | conFixity_RDR, conIsRecord_RDR, |
|---|
| 626 | noArityDataCon_RDR, arityDataCon_RDR, selName_RDR, |
|---|
| 627 | prefixDataCon_RDR, infixDataCon_RDR, leftAssocDataCon_RDR, |
|---|
| 628 | rightAssocDataCon_RDR, notAssocDataCon_RDR :: RdrName |
|---|
| 629 | |
|---|
| 630 | u1DataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "U1") |
|---|
| 631 | par1DataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "Par1") |
|---|
| 632 | rec1DataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "Rec1") |
|---|
| 633 | k1DataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "K1") |
|---|
| 634 | m1DataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "M1") |
|---|
| 635 | |
|---|
| 636 | l1DataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "L1") |
|---|
| 637 | r1DataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "R1") |
|---|
| 638 | |
|---|
| 639 | prodDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit ":*:") |
|---|
| 640 | comp1DataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "Comp1") |
|---|
| 641 | |
|---|
| 642 | from_RDR = varQual_RDR gHC_GENERICS (fsLit "from") |
|---|
| 643 | from1_RDR = varQual_RDR gHC_GENERICS (fsLit "from1") |
|---|
| 644 | to_RDR = varQual_RDR gHC_GENERICS (fsLit "to") |
|---|
| 645 | to1_RDR = varQual_RDR gHC_GENERICS (fsLit "to1") |
|---|
| 646 | |
|---|
| 647 | datatypeName_RDR = varQual_RDR gHC_GENERICS (fsLit "datatypeName") |
|---|
| 648 | moduleName_RDR = varQual_RDR gHC_GENERICS (fsLit "moduleName") |
|---|
| 649 | selName_RDR = varQual_RDR gHC_GENERICS (fsLit "selName") |
|---|
| 650 | conName_RDR = varQual_RDR gHC_GENERICS (fsLit "conName") |
|---|
| 651 | conFixity_RDR = varQual_RDR gHC_GENERICS (fsLit "conFixity") |
|---|
| 652 | conIsRecord_RDR = varQual_RDR gHC_GENERICS (fsLit "conIsRecord") |
|---|
| 653 | |
|---|
| 654 | noArityDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "NoArity") |
|---|
| 655 | arityDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "Arity") |
|---|
| 656 | prefixDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "Prefix") |
|---|
| 657 | infixDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "Infix") |
|---|
| 658 | leftAssocDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "LeftAssociative") |
|---|
| 659 | rightAssocDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "RightAssociative") |
|---|
| 660 | notAssocDataCon_RDR = dataQual_RDR gHC_GENERICS (fsLit "NotAssociative") |
|---|
| 661 | |
|---|
| 662 | |
|---|
| 663 | fmap_RDR, pure_RDR, ap_RDR, foldable_foldr_RDR, traverse_RDR :: RdrName |
|---|
| 664 | fmap_RDR = varQual_RDR gHC_BASE (fsLit "fmap") |
|---|
| 665 | pure_RDR = varQual_RDR cONTROL_APPLICATIVE (fsLit "pure") |
|---|
| 666 | ap_RDR = varQual_RDR cONTROL_APPLICATIVE (fsLit "<*>") |
|---|
| 667 | foldable_foldr_RDR = varQual_RDR dATA_FOLDABLE (fsLit "foldr") |
|---|
| 668 | traverse_RDR = varQual_RDR dATA_TRAVERSABLE (fsLit "traverse") |
|---|
| 669 | |
|---|
| 670 | ---------------------- |
|---|
| 671 | varQual_RDR, tcQual_RDR, clsQual_RDR, dataQual_RDR |
|---|
| 672 | :: Module -> FastString -> RdrName |
|---|
| 673 | varQual_RDR mod str = mkOrig mod (mkOccNameFS varName str) |
|---|
| 674 | tcQual_RDR mod str = mkOrig mod (mkOccNameFS tcName str) |
|---|
| 675 | clsQual_RDR mod str = mkOrig mod (mkOccNameFS clsName str) |
|---|
| 676 | dataQual_RDR mod str = mkOrig mod (mkOccNameFS dataName str) |
|---|
| 677 | \end{code} |
|---|
| 678 | |
|---|
| 679 | %************************************************************************ |
|---|
| 680 | %* * |
|---|
| 681 | \subsection{Known-key names} |
|---|
| 682 | %* * |
|---|
| 683 | %************************************************************************ |
|---|
| 684 | |
|---|
| 685 | Many of these Names are not really "built in", but some parts of the |
|---|
| 686 | compiler (notably the deriving mechanism) need to mention their names, |
|---|
| 687 | and it's convenient to write them all down in one place. |
|---|
| 688 | |
|---|
| 689 | --MetaHaskell Extension add the constrs and the lower case case |
|---|
| 690 | -- guys as well (perhaps) e.g. see trueDataConName below |
|---|
| 691 | |
|---|
| 692 | |
|---|
| 693 | \begin{code} |
|---|
| 694 | wildCardName :: Name |
|---|
| 695 | wildCardName = mkSystemVarName wildCardKey (fsLit "wild") |
|---|
| 696 | |
|---|
| 697 | runMainIOName :: Name |
|---|
| 698 | runMainIOName = varQual gHC_TOP_HANDLER (fsLit "runMainIO") runMainKey |
|---|
| 699 | |
|---|
| 700 | orderingTyConName, ltDataConName, eqDataConName, gtDataConName :: Name |
|---|
| 701 | orderingTyConName = tcQual gHC_TYPES (fsLit "Ordering") orderingTyConKey |
|---|
| 702 | ltDataConName = conName gHC_TYPES (fsLit "LT") ltDataConKey |
|---|
| 703 | eqDataConName = conName gHC_TYPES (fsLit "EQ") eqDataConKey |
|---|
| 704 | gtDataConName = conName gHC_TYPES (fsLit "GT") gtDataConKey |
|---|
| 705 | |
|---|
| 706 | eitherTyConName, leftDataConName, rightDataConName :: Name |
|---|
| 707 | eitherTyConName = tcQual dATA_EITHER (fsLit "Either") eitherTyConKey |
|---|
| 708 | leftDataConName = conName dATA_EITHER (fsLit "Left") leftDataConKey |
|---|
| 709 | rightDataConName = conName dATA_EITHER (fsLit "Right") rightDataConKey |
|---|
| 710 | |
|---|
| 711 | -- Generics (types) |
|---|
| 712 | v1TyConName, u1TyConName, par1TyConName, rec1TyConName, |
|---|
| 713 | k1TyConName, m1TyConName, sumTyConName, prodTyConName, |
|---|
| 714 | compTyConName, rTyConName, pTyConName, dTyConName, |
|---|
| 715 | cTyConName, sTyConName, rec0TyConName, par0TyConName, |
|---|
| 716 | d1TyConName, c1TyConName, s1TyConName, noSelTyConName, |
|---|
| 717 | repTyConName, rep1TyConName :: Name |
|---|
| 718 | |
|---|
| 719 | v1TyConName = tcQual gHC_GENERICS (fsLit "V1") v1TyConKey |
|---|
| 720 | u1TyConName = tcQual gHC_GENERICS (fsLit "U1") u1TyConKey |
|---|
| 721 | par1TyConName = tcQual gHC_GENERICS (fsLit "Par1") par1TyConKey |
|---|
| 722 | rec1TyConName = tcQual gHC_GENERICS (fsLit "Rec1") rec1TyConKey |
|---|
| 723 | k1TyConName = tcQual gHC_GENERICS (fsLit "K1") k1TyConKey |
|---|
| 724 | m1TyConName = tcQual gHC_GENERICS (fsLit "M1") m1TyConKey |
|---|
| 725 | |
|---|
| 726 | sumTyConName = tcQual gHC_GENERICS (fsLit ":+:") sumTyConKey |
|---|
| 727 | prodTyConName = tcQual gHC_GENERICS (fsLit ":*:") prodTyConKey |
|---|
| 728 | compTyConName = tcQual gHC_GENERICS (fsLit ":.:") compTyConKey |
|---|
| 729 | |
|---|
| 730 | rTyConName = tcQual gHC_GENERICS (fsLit "R") rTyConKey |
|---|
| 731 | pTyConName = tcQual gHC_GENERICS (fsLit "P") pTyConKey |
|---|
| 732 | dTyConName = tcQual gHC_GENERICS (fsLit "D") dTyConKey |
|---|
| 733 | cTyConName = tcQual gHC_GENERICS (fsLit "C") cTyConKey |
|---|
| 734 | sTyConName = tcQual gHC_GENERICS (fsLit "S") sTyConKey |
|---|
| 735 | |
|---|
| 736 | rec0TyConName = tcQual gHC_GENERICS (fsLit "Rec0") rec0TyConKey |
|---|
| 737 | par0TyConName = tcQual gHC_GENERICS (fsLit "Par0") par0TyConKey |
|---|
| 738 | d1TyConName = tcQual gHC_GENERICS (fsLit "D1") d1TyConKey |
|---|
| 739 | c1TyConName = tcQual gHC_GENERICS (fsLit "C1") c1TyConKey |
|---|
| 740 | s1TyConName = tcQual gHC_GENERICS (fsLit "S1") s1TyConKey |
|---|
| 741 | noSelTyConName = tcQual gHC_GENERICS (fsLit "NoSelector") noSelTyConKey |
|---|
| 742 | |
|---|
| 743 | repTyConName = tcQual gHC_GENERICS (fsLit "Rep") repTyConKey |
|---|
| 744 | rep1TyConName = tcQual gHC_GENERICS (fsLit "Rep1") rep1TyConKey |
|---|
| 745 | |
|---|
| 746 | -- Base strings Strings |
|---|
| 747 | unpackCStringName, unpackCStringFoldrName, |
|---|
| 748 | unpackCStringUtf8Name, eqStringName, stringTyConName :: Name |
|---|
| 749 | unpackCStringName = varQual gHC_CSTRING (fsLit "unpackCString#") unpackCStringIdKey |
|---|
| 750 | unpackCStringFoldrName = varQual gHC_CSTRING (fsLit "unpackFoldrCString#") unpackCStringFoldrIdKey |
|---|
| 751 | unpackCStringUtf8Name = varQual gHC_CSTRING (fsLit "unpackCStringUtf8#") unpackCStringUtf8IdKey |
|---|
| 752 | eqStringName = varQual gHC_BASE (fsLit "eqString") eqStringIdKey |
|---|
| 753 | stringTyConName = tcQual gHC_BASE (fsLit "String") stringTyConKey |
|---|
| 754 | |
|---|
| 755 | -- The 'inline' function |
|---|
| 756 | inlineIdName :: Name |
|---|
| 757 | inlineIdName = varQual gHC_MAGIC (fsLit "inline") inlineIdKey |
|---|
| 758 | |
|---|
| 759 | -- The 'undefined' function. Used by supercompilation. |
|---|
| 760 | undefinedName :: Name |
|---|
| 761 | undefinedName = varQual gHC_ERR (fsLit "undefined") undefinedKey |
|---|
| 762 | |
|---|
| 763 | -- Base classes (Eq, Ord, Functor) |
|---|
| 764 | fmapName, eqClassName, eqName, ordClassName, geName, functorClassName :: Name |
|---|
| 765 | eqClassName = clsQual gHC_CLASSES (fsLit "Eq") eqClassKey |
|---|
| 766 | eqName = methName gHC_CLASSES (fsLit "==") eqClassOpKey |
|---|
| 767 | ordClassName = clsQual gHC_CLASSES (fsLit "Ord") ordClassKey |
|---|
| 768 | geName = methName gHC_CLASSES (fsLit ">=") geClassOpKey |
|---|
| 769 | functorClassName = clsQual gHC_BASE (fsLit "Functor") functorClassKey |
|---|
| 770 | fmapName = methName gHC_BASE (fsLit "fmap") fmapClassOpKey |
|---|
| 771 | |
|---|
| 772 | -- Class Monad |
|---|
| 773 | monadClassName, thenMName, bindMName, returnMName, failMName :: Name |
|---|
| 774 | monadClassName = clsQual gHC_BASE (fsLit "Monad") monadClassKey |
|---|
| 775 | thenMName = methName gHC_BASE (fsLit ">>") thenMClassOpKey |
|---|
| 776 | bindMName = methName gHC_BASE (fsLit ">>=") bindMClassOpKey |
|---|
| 777 | returnMName = methName gHC_BASE (fsLit "return") returnMClassOpKey |
|---|
| 778 | failMName = methName gHC_BASE (fsLit "fail") failMClassOpKey |
|---|
| 779 | |
|---|
| 780 | -- Classes (Applicative, Foldable, Traversable) |
|---|
| 781 | applicativeClassName, foldableClassName, traversableClassName :: Name |
|---|
| 782 | applicativeClassName = clsQual cONTROL_APPLICATIVE (fsLit "Applicative") applicativeClassKey |
|---|
| 783 | foldableClassName = clsQual dATA_FOLDABLE (fsLit "Foldable") foldableClassKey |
|---|
| 784 | traversableClassName = clsQual dATA_TRAVERSABLE (fsLit "Traversable") traversableClassKey |
|---|
| 785 | |
|---|
| 786 | -- Functions for GHC extensions |
|---|
| 787 | groupWithName :: Name |
|---|
| 788 | groupWithName = varQual gHC_EXTS (fsLit "groupWith") groupWithIdKey |
|---|
| 789 | |
|---|
| 790 | -- Random PrelBase functions |
|---|
| 791 | fromStringName, otherwiseIdName, foldrName, buildName, augmentName, |
|---|
| 792 | mapName, appendName, assertName, |
|---|
| 793 | breakpointName, breakpointCondName, breakpointAutoName, |
|---|
| 794 | dollarName, opaqueTyConName :: Name |
|---|
| 795 | fromStringName = methName dATA_STRING (fsLit "fromString") fromStringClassOpKey |
|---|
| 796 | otherwiseIdName = varQual gHC_BASE (fsLit "otherwise") otherwiseIdKey |
|---|
| 797 | foldrName = varQual gHC_BASE (fsLit "foldr") foldrIdKey |
|---|
| 798 | buildName = varQual gHC_BASE (fsLit "build") buildIdKey |
|---|
| 799 | augmentName = varQual gHC_BASE (fsLit "augment") augmentIdKey |
|---|
| 800 | mapName = varQual gHC_BASE (fsLit "map") mapIdKey |
|---|
| 801 | appendName = varQual gHC_BASE (fsLit "++") appendIdKey |
|---|
| 802 | dollarName = varQual gHC_BASE (fsLit "$") dollarIdKey |
|---|
| 803 | assertName = varQual gHC_BASE (fsLit "assert") assertIdKey |
|---|
| 804 | breakpointName = varQual gHC_BASE (fsLit "breakpoint") breakpointIdKey |
|---|
| 805 | breakpointCondName= varQual gHC_BASE (fsLit "breakpointCond") breakpointCondIdKey |
|---|
| 806 | breakpointAutoName= varQual gHC_BASE (fsLit "breakpointAuto") breakpointAutoIdKey |
|---|
| 807 | opaqueTyConName = tcQual gHC_BASE (fsLit "Opaque") opaqueTyConKey |
|---|
| 808 | |
|---|
| 809 | breakpointJumpName :: Name |
|---|
| 810 | breakpointJumpName |
|---|
| 811 | = mkInternalName |
|---|
| 812 | breakpointJumpIdKey |
|---|
| 813 | (mkOccNameFS varName (fsLit "breakpointJump")) |
|---|
| 814 | noSrcSpan |
|---|
| 815 | breakpointCondJumpName :: Name |
|---|
| 816 | breakpointCondJumpName |
|---|
| 817 | = mkInternalName |
|---|
| 818 | breakpointCondJumpIdKey |
|---|
| 819 | (mkOccNameFS varName (fsLit "breakpointCondJump")) |
|---|
| 820 | noSrcSpan |
|---|
| 821 | breakpointAutoJumpName :: Name |
|---|
| 822 | breakpointAutoJumpName |
|---|
| 823 | = mkInternalName |
|---|
| 824 | breakpointAutoJumpIdKey |
|---|
| 825 | (mkOccNameFS varName (fsLit "breakpointAutoJump")) |
|---|
| 826 | noSrcSpan |
|---|
| 827 | |
|---|
| 828 | -- PrelTup |
|---|
| 829 | fstName, sndName :: Name |
|---|
| 830 | fstName = varQual dATA_TUPLE (fsLit "fst") fstIdKey |
|---|
| 831 | sndName = varQual dATA_TUPLE (fsLit "snd") sndIdKey |
|---|
| 832 | |
|---|
| 833 | -- Module GHC.Num |
|---|
| 834 | numClassName, fromIntegerName, minusName, negateName :: Name |
|---|
| 835 | numClassName = clsQual gHC_NUM (fsLit "Num") numClassKey |
|---|
| 836 | fromIntegerName = methName gHC_NUM (fsLit "fromInteger") fromIntegerClassOpKey |
|---|
| 837 | minusName = methName gHC_NUM (fsLit "-") minusClassOpKey |
|---|
| 838 | negateName = methName gHC_NUM (fsLit "negate") negateClassOpKey |
|---|
| 839 | |
|---|
| 840 | integerTyConName, mkIntegerName, |
|---|
| 841 | integerToWord64Name, integerToInt64Name, |
|---|
| 842 | plusIntegerName, timesIntegerName, smallIntegerName, |
|---|
| 843 | integerToWordName, integerToIntName, minusIntegerName, |
|---|
| 844 | negateIntegerName, eqIntegerName, neqIntegerName, |
|---|
| 845 | absIntegerName, signumIntegerName, |
|---|
| 846 | leIntegerName, gtIntegerName, ltIntegerName, geIntegerName, |
|---|
| 847 | compareIntegerName, quotRemIntegerName, divModIntegerName, |
|---|
| 848 | quotIntegerName, remIntegerName, |
|---|
| 849 | floatFromIntegerName, doubleFromIntegerName, |
|---|
| 850 | encodeFloatIntegerName, encodeDoubleIntegerName, |
|---|
| 851 | gcdIntegerName, lcmIntegerName, |
|---|
| 852 | andIntegerName, orIntegerName, xorIntegerName, complementIntegerName, |
|---|
| 853 | shiftLIntegerName, shiftRIntegerName :: Name |
|---|
| 854 | integerTyConName = tcQual gHC_INTEGER_TYPE (fsLit "Integer") integerTyConKey |
|---|
| 855 | mkIntegerName = varQual gHC_INTEGER_TYPE (fsLit "mkInteger") mkIntegerIdKey |
|---|
| 856 | integerToWord64Name = varQual gHC_INTEGER_TYPE (fsLit "integerToWord64") integerToWord64IdKey |
|---|
| 857 | integerToInt64Name = varQual gHC_INTEGER_TYPE (fsLit "integerToInt64") integerToInt64IdKey |
|---|
| 858 | plusIntegerName = varQual gHC_INTEGER_TYPE (fsLit "plusInteger") plusIntegerIdKey |
|---|
| 859 | timesIntegerName = varQual gHC_INTEGER_TYPE (fsLit "timesInteger") timesIntegerIdKey |
|---|
| 860 | smallIntegerName = varQual gHC_INTEGER_TYPE (fsLit "smallInteger") smallIntegerIdKey |
|---|
| 861 | integerToWordName = varQual gHC_INTEGER_TYPE (fsLit "integerToWord") integerToWordIdKey |
|---|
| 862 | integerToIntName = varQual gHC_INTEGER_TYPE (fsLit "integerToInt") integerToIntIdKey |
|---|
| 863 | minusIntegerName = varQual gHC_INTEGER_TYPE (fsLit "minusInteger") minusIntegerIdKey |
|---|
| 864 | negateIntegerName = varQual gHC_INTEGER_TYPE (fsLit "negateInteger") negateIntegerIdKey |
|---|
| 865 | eqIntegerName = varQual gHC_INTEGER_TYPE (fsLit "eqInteger") eqIntegerIdKey |
|---|
| 866 | neqIntegerName = varQual gHC_INTEGER_TYPE (fsLit "neqInteger") neqIntegerIdKey |
|---|
| 867 | absIntegerName = varQual gHC_INTEGER_TYPE (fsLit "absInteger") absIntegerIdKey |
|---|
| 868 | signumIntegerName = varQual gHC_INTEGER_TYPE (fsLit "signumInteger") signumIntegerIdKey |
|---|
| 869 | leIntegerName = varQual gHC_INTEGER_TYPE (fsLit "leInteger") leIntegerIdKey |
|---|
| 870 | gtIntegerName = varQual gHC_INTEGER_TYPE (fsLit "gtInteger") gtIntegerIdKey |
|---|
| 871 | ltIntegerName = varQual gHC_INTEGER_TYPE (fsLit "ltInteger") ltIntegerIdKey |
|---|
| 872 | geIntegerName = varQual gHC_INTEGER_TYPE (fsLit "geInteger") geIntegerIdKey |
|---|
| 873 | compareIntegerName = varQual gHC_INTEGER_TYPE (fsLit "compareInteger") compareIntegerIdKey |
|---|
| 874 | quotRemIntegerName = varQual gHC_INTEGER_TYPE (fsLit "quotRemInteger") quotRemIntegerIdKey |
|---|
| 875 | divModIntegerName = varQual gHC_INTEGER_TYPE (fsLit "divModInteger") divModIntegerIdKey |
|---|
| 876 | quotIntegerName = varQual gHC_INTEGER_TYPE (fsLit "quotInteger") quotIntegerIdKey |
|---|
| 877 | remIntegerName = varQual gHC_INTEGER_TYPE (fsLit "remInteger") remIntegerIdKey |
|---|
| 878 | floatFromIntegerName = varQual gHC_INTEGER_TYPE (fsLit "floatFromInteger") floatFromIntegerIdKey |
|---|
| 879 | doubleFromIntegerName = varQual gHC_INTEGER_TYPE (fsLit "doubleFromInteger") doubleFromIntegerIdKey |
|---|
| 880 | encodeFloatIntegerName = varQual gHC_INTEGER_TYPE (fsLit "encodeFloatInteger") encodeFloatIntegerIdKey |
|---|
| 881 | encodeDoubleIntegerName = varQual gHC_INTEGER_TYPE (fsLit "encodeDoubleInteger") encodeDoubleIntegerIdKey |
|---|
| 882 | gcdIntegerName = varQual gHC_INTEGER_TYPE (fsLit "gcdInteger") gcdIntegerIdKey |
|---|
| 883 | lcmIntegerName = varQual gHC_INTEGER_TYPE (fsLit "lcmInteger") lcmIntegerIdKey |
|---|
| 884 | andIntegerName = varQual gHC_INTEGER_TYPE (fsLit "andInteger") andIntegerIdKey |
|---|
| 885 | orIntegerName = varQual gHC_INTEGER_TYPE (fsLit "orInteger") orIntegerIdKey |
|---|
| 886 | xorIntegerName = varQual gHC_INTEGER_TYPE (fsLit "xorInteger") xorIntegerIdKey |
|---|
| 887 | complementIntegerName = varQual gHC_INTEGER_TYPE (fsLit "complementInteger") complementIntegerIdKey |
|---|
| 888 | shiftLIntegerName = varQual gHC_INTEGER_TYPE (fsLit "shiftLInteger") shiftLIntegerIdKey |
|---|
| 889 | shiftRIntegerName = varQual gHC_INTEGER_TYPE (fsLit "shiftRInteger") shiftRIntegerIdKey |
|---|
| 890 | |
|---|
| 891 | -- GHC.Real types and classes |
|---|
| 892 | rationalTyConName, ratioTyConName, ratioDataConName, realClassName, |
|---|
| 893 | integralClassName, realFracClassName, fractionalClassName, |
|---|
| 894 | fromRationalName, toIntegerName, toRationalName, fromIntegralName, |
|---|
| 895 | realToFracName :: Name |
|---|
| 896 | rationalTyConName = tcQual gHC_REAL (fsLit "Rational") rationalTyConKey |
|---|
| 897 | ratioTyConName = tcQual gHC_REAL (fsLit "Ratio") ratioTyConKey |
|---|
| 898 | ratioDataConName = conName gHC_REAL (fsLit ":%") ratioDataConKey |
|---|
| 899 | realClassName = clsQual gHC_REAL (fsLit "Real") realClassKey |
|---|
| 900 | integralClassName = clsQual gHC_REAL (fsLit "Integral") integralClassKey |
|---|
| 901 | realFracClassName = clsQual gHC_REAL (fsLit "RealFrac") realFracClassKey |
|---|
| 902 | fractionalClassName = clsQual gHC_REAL (fsLit "Fractional") fractionalClassKey |
|---|
| 903 | fromRationalName = methName gHC_REAL (fsLit "fromRational") fromRationalClassOpKey |
|---|
| 904 | toIntegerName = methName gHC_REAL (fsLit "toInteger") toIntegerClassOpKey |
|---|
| 905 | toRationalName = methName gHC_REAL (fsLit "toRational") toRationalClassOpKey |
|---|
| 906 | fromIntegralName = varQual gHC_REAL (fsLit "fromIntegral") fromIntegralIdKey |
|---|
| 907 | realToFracName = varQual gHC_REAL (fsLit "realToFrac") realToFracIdKey |
|---|
| 908 | |
|---|
| 909 | -- PrelFloat classes |
|---|
| 910 | floatingClassName, realFloatClassName :: Name |
|---|
| 911 | floatingClassName = clsQual gHC_FLOAT (fsLit "Floating") floatingClassKey |
|---|
| 912 | realFloatClassName = clsQual gHC_FLOAT (fsLit "RealFloat") realFloatClassKey |
|---|
| 913 | |
|---|
| 914 | -- Class Ix |
|---|
| 915 | ixClassName :: Name |
|---|
| 916 | ixClassName = clsQual gHC_ARR (fsLit "Ix") ixClassKey |
|---|
| 917 | |
|---|
| 918 | -- Class Typeable |
|---|
| 919 | typeableClassName, typeable1ClassName, typeable2ClassName, |
|---|
| 920 | typeable3ClassName, typeable4ClassName, typeable5ClassName, |
|---|
| 921 | typeable6ClassName, typeable7ClassName :: Name |
|---|
| 922 | typeableClassName = clsQual tYPEABLE_INTERNAL (fsLit "Typeable") typeableClassKey |
|---|
| 923 | typeable1ClassName = clsQual tYPEABLE_INTERNAL (fsLit "Typeable1") typeable1ClassKey |
|---|
| 924 | typeable2ClassName = clsQual tYPEABLE_INTERNAL (fsLit "Typeable2") typeable2ClassKey |
|---|
| 925 | typeable3ClassName = clsQual tYPEABLE_INTERNAL (fsLit "Typeable3") typeable3ClassKey |
|---|
| 926 | typeable4ClassName = clsQual tYPEABLE_INTERNAL (fsLit "Typeable4") typeable4ClassKey |
|---|
| 927 | typeable5ClassName = clsQual tYPEABLE_INTERNAL (fsLit "Typeable5") typeable5ClassKey |
|---|
| 928 | typeable6ClassName = clsQual tYPEABLE_INTERNAL (fsLit "Typeable6") typeable6ClassKey |
|---|
| 929 | typeable7ClassName = clsQual tYPEABLE_INTERNAL (fsLit "Typeable7") typeable7ClassKey |
|---|
| 930 | |
|---|
| 931 | typeableClassNames :: [Name] |
|---|
| 932 | typeableClassNames = [ typeableClassName, typeable1ClassName, typeable2ClassName |
|---|
| 933 | , typeable3ClassName, typeable4ClassName, typeable5ClassName |
|---|
| 934 | , typeable6ClassName, typeable7ClassName ] |
|---|
| 935 | |
|---|
| 936 | -- Class Data |
|---|
| 937 | dataClassName :: Name |
|---|
| 938 | dataClassName = clsQual gENERICS (fsLit "Data") dataClassKey |
|---|
| 939 | |
|---|
| 940 | -- Error module |
|---|
| 941 | assertErrorName :: Name |
|---|
| 942 | assertErrorName = varQual gHC_IO_Exception (fsLit "assertError") assertErrorIdKey |
|---|
| 943 | |
|---|
| 944 | -- Enum module (Enum, Bounded) |
|---|
| 945 | enumClassName, enumFromName, enumFromToName, enumFromThenName, |
|---|
| 946 | enumFromThenToName, boundedClassName :: Name |
|---|
| 947 | enumClassName = clsQual gHC_ENUM (fsLit "Enum") enumClassKey |
|---|
| 948 | enumFromName = methName gHC_ENUM (fsLit "enumFrom") enumFromClassOpKey |
|---|
| 949 | enumFromToName = methName gHC_ENUM (fsLit "enumFromTo") enumFromToClassOpKey |
|---|
| 950 | enumFromThenName = methName gHC_ENUM (fsLit "enumFromThen") enumFromThenClassOpKey |
|---|
| 951 | enumFromThenToName = methName gHC_ENUM (fsLit "enumFromThenTo") enumFromThenToClassOpKey |
|---|
| 952 | boundedClassName = clsQual gHC_ENUM (fsLit "Bounded") boundedClassKey |
|---|
| 953 | |
|---|
| 954 | -- List functions |
|---|
| 955 | concatName, filterName, zipName :: Name |
|---|
| 956 | concatName = varQual gHC_LIST (fsLit "concat") concatIdKey |
|---|
| 957 | filterName = varQual gHC_LIST (fsLit "filter") filterIdKey |
|---|
| 958 | zipName = varQual gHC_LIST (fsLit "zip") zipIdKey |
|---|
| 959 | |
|---|
| 960 | -- Class Show |
|---|
| 961 | showClassName :: Name |
|---|
| 962 | showClassName = clsQual gHC_SHOW (fsLit "Show") showClassKey |
|---|
| 963 | |
|---|
| 964 | -- Class Read |
|---|
| 965 | readClassName :: Name |
|---|
| 966 | readClassName = clsQual gHC_READ (fsLit "Read") readClassKey |
|---|
| 967 | |
|---|
| 968 | -- Classes Generic and Generic1, Datatype, Constructor and Selector |
|---|
| 969 | genClassName, gen1ClassName, datatypeClassName, constructorClassName, |
|---|
| 970 | selectorClassName :: Name |
|---|
| 971 | genClassName = clsQual gHC_GENERICS (fsLit "Generic") genClassKey |
|---|
| 972 | gen1ClassName = clsQual gHC_GENERICS (fsLit "Generic1") gen1ClassKey |
|---|
| 973 | |
|---|
| 974 | datatypeClassName = clsQual gHC_GENERICS (fsLit "Datatype") datatypeClassKey |
|---|
| 975 | constructorClassName = clsQual gHC_GENERICS (fsLit "Constructor") constructorClassKey |
|---|
| 976 | selectorClassName = clsQual gHC_GENERICS (fsLit "Selector") selectorClassKey |
|---|
| 977 | |
|---|
| 978 | -- GHCi things |
|---|
| 979 | ghciIoClassName, ghciStepIoMName :: Name |
|---|
| 980 | ghciIoClassName = clsQual gHC_GHCI (fsLit "GHCiSandboxIO") ghciIoClassKey |
|---|
| 981 | ghciStepIoMName = methName gHC_GHCI (fsLit "ghciStepIO") ghciStepIoMClassOpKey |
|---|
| 982 | |
|---|
| 983 | -- IO things |
|---|
| 984 | ioTyConName, ioDataConName, thenIOName, bindIOName, returnIOName, |
|---|
| 985 | failIOName :: Name |
|---|
| 986 | ioTyConName = tcQual gHC_TYPES (fsLit "IO") ioTyConKey |
|---|
| 987 | ioDataConName = conName gHC_TYPES (fsLit "IO") ioDataConKey |
|---|
| 988 | thenIOName = varQual gHC_BASE (fsLit "thenIO") thenIOIdKey |
|---|
| 989 | bindIOName = varQual gHC_BASE (fsLit "bindIO") bindIOIdKey |
|---|
| 990 | returnIOName = varQual gHC_BASE (fsLit "returnIO") returnIOIdKey |
|---|
| 991 | failIOName = varQual gHC_IO (fsLit "failIO") failIOIdKey |
|---|
| 992 | |
|---|
| 993 | -- IO things |
|---|
| 994 | printName :: Name |
|---|
| 995 | printName = varQual sYSTEM_IO (fsLit "print") printIdKey |
|---|
| 996 | |
|---|
| 997 | -- Int, Word, and Addr things |
|---|
| 998 | int8TyConName, int16TyConName, int32TyConName, int64TyConName :: Name |
|---|
| 999 | int8TyConName = tcQual gHC_INT (fsLit "Int8") int8TyConKey |
|---|
| 1000 | int16TyConName = tcQual gHC_INT (fsLit "Int16") int16TyConKey |
|---|
| 1001 | int32TyConName = tcQual gHC_INT (fsLit "Int32") int32TyConKey |
|---|
| 1002 | int64TyConName = tcQual gHC_INT (fsLit "Int64") int64TyConKey |
|---|
| 1003 | |
|---|
| 1004 | -- Word module |
|---|
| 1005 | word8TyConName, word16TyConName, word32TyConName, word64TyConName, |
|---|
| 1006 | wordTyConName, wordDataConName :: Name |
|---|
| 1007 | word8TyConName = tcQual gHC_WORD (fsLit "Word8") word8TyConKey |
|---|
| 1008 | word16TyConName = tcQual gHC_WORD (fsLit "Word16") word16TyConKey |
|---|
| 1009 | word32TyConName = tcQual gHC_WORD (fsLit "Word32") word32TyConKey |
|---|
| 1010 | word64TyConName = tcQual gHC_WORD (fsLit "Word64") word64TyConKey |
|---|
| 1011 | wordTyConName = tcQual gHC_TYPES (fsLit "Word") wordTyConKey |
|---|
| 1012 | wordDataConName = conName gHC_TYPES (fsLit "W#") wordDataConKey |
|---|
| 1013 | |
|---|
| 1014 | -- PrelPtr module |
|---|
| 1015 | ptrTyConName, funPtrTyConName :: Name |
|---|
| 1016 | ptrTyConName = tcQual gHC_PTR (fsLit "Ptr") ptrTyConKey |
|---|
| 1017 | funPtrTyConName = tcQual gHC_PTR (fsLit "FunPtr") funPtrTyConKey |
|---|
| 1018 | |
|---|
| 1019 | -- Foreign objects and weak pointers |
|---|
| 1020 | stablePtrTyConName, newStablePtrName :: Name |
|---|
| 1021 | stablePtrTyConName = tcQual gHC_STABLE (fsLit "StablePtr") stablePtrTyConKey |
|---|
| 1022 | newStablePtrName = varQual gHC_STABLE (fsLit "newStablePtr") newStablePtrIdKey |
|---|
| 1023 | |
|---|
| 1024 | -- PrelST module |
|---|
| 1025 | runSTRepName :: Name |
|---|
| 1026 | runSTRepName = varQual gHC_ST (fsLit "runSTRep") runSTRepIdKey |
|---|
| 1027 | |
|---|
| 1028 | -- Recursive-do notation |
|---|
| 1029 | monadFixClassName, mfixName :: Name |
|---|
| 1030 | monadFixClassName = clsQual mONAD_FIX (fsLit "MonadFix") monadFixClassKey |
|---|
| 1031 | mfixName = methName mONAD_FIX (fsLit "mfix") mfixIdKey |
|---|
| 1032 | |
|---|
| 1033 | -- Arrow notation |
|---|
| 1034 | arrAName, composeAName, firstAName, appAName, choiceAName, loopAName :: Name |
|---|
| 1035 | arrAName = varQual aRROW (fsLit "arr") arrAIdKey |
|---|
| 1036 | composeAName = varQual gHC_DESUGAR (fsLit ">>>") composeAIdKey |
|---|
| 1037 | firstAName = varQual aRROW (fsLit "first") firstAIdKey |
|---|
| 1038 | appAName = varQual aRROW (fsLit "app") appAIdKey |
|---|
| 1039 | choiceAName = varQual aRROW (fsLit "|||") choiceAIdKey |
|---|
| 1040 | loopAName = varQual aRROW (fsLit "loop") loopAIdKey |
|---|
| 1041 | |
|---|
| 1042 | -- Monad comprehensions |
|---|
| 1043 | guardMName, liftMName, mzipName :: Name |
|---|
| 1044 | guardMName = varQual mONAD (fsLit "guard") guardMIdKey |
|---|
| 1045 | liftMName = varQual mONAD (fsLit "liftM") liftMIdKey |
|---|
| 1046 | mzipName = varQual mONAD_ZIP (fsLit "mzip") mzipIdKey |
|---|
| 1047 | |
|---|
| 1048 | |
|---|
| 1049 | -- Annotation type checking |
|---|
| 1050 | toAnnotationWrapperName :: Name |
|---|
| 1051 | toAnnotationWrapperName = varQual gHC_DESUGAR (fsLit "toAnnotationWrapper") toAnnotationWrapperIdKey |
|---|
| 1052 | |
|---|
| 1053 | -- Other classes, needed for type defaulting |
|---|
| 1054 | monadPlusClassName, randomClassName, randomGenClassName, |
|---|
| 1055 | isStringClassName :: Name |
|---|
| 1056 | monadPlusClassName = clsQual mONAD (fsLit "MonadPlus") monadPlusClassKey |
|---|
| 1057 | randomClassName = clsQual rANDOM (fsLit "Random") randomClassKey |
|---|
| 1058 | randomGenClassName = clsQual rANDOM (fsLit "RandomGen") randomGenClassKey |
|---|
| 1059 | isStringClassName = clsQual dATA_STRING (fsLit "IsString") isStringClassKey |
|---|
| 1060 | |
|---|
| 1061 | -- Type-level naturals |
|---|
| 1062 | typeNatKindConName, typeStringKindConName, |
|---|
| 1063 | singIClassName, typeNatLeqClassName, |
|---|
| 1064 | typeNatAddTyFamName, typeNatMulTyFamName, typeNatExpTyFamName :: Name |
|---|
| 1065 | typeNatKindConName = tcQual gHC_TYPELITS (fsLit "Nat") typeNatKindConNameKey |
|---|
| 1066 | typeStringKindConName = tcQual gHC_TYPELITS (fsLit "Symbol") |
|---|
| 1067 | typeStringKindConNameKey |
|---|
| 1068 | singIClassName = clsQual gHC_TYPELITS (fsLit "SingI") singIClassNameKey |
|---|
| 1069 | typeNatLeqClassName = clsQual gHC_TYPELITS (fsLit "<=") typeNatLeqClassNameKey |
|---|
| 1070 | typeNatAddTyFamName = tcQual gHC_TYPELITS (fsLit "+") typeNatAddTyFamNameKey |
|---|
| 1071 | typeNatMulTyFamName = tcQual gHC_TYPELITS (fsLit "*") typeNatMulTyFamNameKey |
|---|
| 1072 | typeNatExpTyFamName = tcQual gHC_TYPELITS (fsLit "^") typeNatExpTyFamNameKey |
|---|
| 1073 | |
|---|
| 1074 | -- dotnet interop |
|---|
| 1075 | objectTyConName :: Name |
|---|
| 1076 | objectTyConName = tcQual dOTNET (fsLit "Object") objectTyConKey |
|---|
| 1077 | -- objectTyConName was "wTcQual", but that's gone now, and |
|---|
| 1078 | -- I can't see why it was wired in anyway... |
|---|
| 1079 | unmarshalObjectName, marshalObjectName, marshalStringName, |
|---|
| 1080 | unmarshalStringName, checkDotnetResName :: Name |
|---|
| 1081 | unmarshalObjectName = varQual dOTNET (fsLit "unmarshalObject") unmarshalObjectIdKey |
|---|
| 1082 | marshalObjectName = varQual dOTNET (fsLit "marshalObject") marshalObjectIdKey |
|---|
| 1083 | marshalStringName = varQual dOTNET (fsLit "marshalString") marshalStringIdKey |
|---|
| 1084 | unmarshalStringName = varQual dOTNET (fsLit "unmarshalString") unmarshalStringIdKey |
|---|
| 1085 | checkDotnetResName = varQual dOTNET (fsLit "checkResult") checkDotnetResNameIdKey |
|---|
| 1086 | |
|---|
| 1087 | -- plugins |
|---|
| 1088 | cORE_MONAD :: Module |
|---|
| 1089 | cORE_MONAD = mkThisGhcModule (fsLit "CoreMonad") |
|---|
| 1090 | pluginTyConName :: Name |
|---|
| 1091 | pluginTyConName = tcQual cORE_MONAD (fsLit "Plugin") pluginTyConKey |
|---|
| 1092 | \end{code} |
|---|
| 1093 | |
|---|
| 1094 | %************************************************************************ |
|---|
| 1095 | %* * |
|---|
| 1096 | \subsection{Local helpers} |
|---|
| 1097 | %* * |
|---|
| 1098 | %************************************************************************ |
|---|
| 1099 | |
|---|
| 1100 | All these are original names; hence mkOrig |
|---|
| 1101 | |
|---|
| 1102 | \begin{code} |
|---|
| 1103 | varQual, tcQual, clsQual :: Module -> FastString -> Unique -> Name |
|---|
| 1104 | varQual = mk_known_key_name varName |
|---|
| 1105 | tcQual = mk_known_key_name tcName |
|---|
| 1106 | clsQual = mk_known_key_name clsName |
|---|
| 1107 | |
|---|
| 1108 | mk_known_key_name :: NameSpace -> Module -> FastString -> Unique -> Name |
|---|
| 1109 | mk_known_key_name space modu str unique |
|---|
| 1110 | = mkExternalName unique modu (mkOccNameFS space str) noSrcSpan |
|---|
| 1111 | |
|---|
| 1112 | conName :: Module -> FastString -> Unique -> Name |
|---|
| 1113 | conName modu occ unique |
|---|
| 1114 | = mkExternalName unique modu (mkOccNameFS dataName occ) noSrcSpan |
|---|
| 1115 | |
|---|
| 1116 | methName :: Module -> FastString -> Unique -> Name |
|---|
| 1117 | methName modu occ unique |
|---|
| 1118 | = mkExternalName unique modu (mkVarOccFS occ) noSrcSpan |
|---|
| 1119 | \end{code} |
|---|
| 1120 | |
|---|
| 1121 | %************************************************************************ |
|---|
| 1122 | %* * |
|---|
| 1123 | \subsubsection[Uniques-prelude-Classes]{@Uniques@ for wired-in @Classes@} |
|---|
| 1124 | %* * |
|---|
| 1125 | %************************************************************************ |
|---|
| 1126 | --MetaHaskell extension hand allocate keys here |
|---|
| 1127 | |
|---|
| 1128 | \begin{code} |
|---|
| 1129 | boundedClassKey, enumClassKey, eqClassKey, floatingClassKey, |
|---|
| 1130 | fractionalClassKey, integralClassKey, monadClassKey, dataClassKey, |
|---|
| 1131 | functorClassKey, numClassKey, ordClassKey, readClassKey, realClassKey, |
|---|
| 1132 | realFloatClassKey, realFracClassKey, showClassKey, ixClassKey :: Unique |
|---|
| 1133 | boundedClassKey = mkPreludeClassUnique 1 |
|---|
| 1134 | enumClassKey = mkPreludeClassUnique 2 |
|---|
| 1135 | eqClassKey = mkPreludeClassUnique 3 |
|---|
| 1136 | floatingClassKey = mkPreludeClassUnique 5 |
|---|
| 1137 | fractionalClassKey = mkPreludeClassUnique 6 |
|---|
| 1138 | integralClassKey = mkPreludeClassUnique 7 |
|---|
| 1139 | monadClassKey = mkPreludeClassUnique 8 |
|---|
| 1140 | dataClassKey = mkPreludeClassUnique 9 |
|---|
| 1141 | functorClassKey = mkPreludeClassUnique 10 |
|---|
| 1142 | numClassKey = mkPreludeClassUnique 11 |
|---|
| 1143 | ordClassKey = mkPreludeClassUnique 12 |
|---|
| 1144 | readClassKey = mkPreludeClassUnique 13 |
|---|
| 1145 | realClassKey = mkPreludeClassUnique 14 |
|---|
| 1146 | realFloatClassKey = mkPreludeClassUnique 15 |
|---|
| 1147 | realFracClassKey = mkPreludeClassUnique 16 |
|---|
| 1148 | showClassKey = mkPreludeClassUnique 17 |
|---|
| 1149 | ixClassKey = mkPreludeClassUnique 18 |
|---|
| 1150 | |
|---|
| 1151 | typeableClassKey, typeable1ClassKey, typeable2ClassKey, typeable3ClassKey, |
|---|
| 1152 | typeable4ClassKey, typeable5ClassKey, typeable6ClassKey, typeable7ClassKey |
|---|
| 1153 | :: Unique |
|---|
| 1154 | typeableClassKey = mkPreludeClassUnique 20 |
|---|
| 1155 | typeable1ClassKey = mkPreludeClassUnique 21 |
|---|
| 1156 | typeable2ClassKey = mkPreludeClassUnique 22 |
|---|
| 1157 | typeable3ClassKey = mkPreludeClassUnique 23 |
|---|
| 1158 | typeable4ClassKey = mkPreludeClassUnique 24 |
|---|
| 1159 | typeable5ClassKey = mkPreludeClassUnique 25 |
|---|
| 1160 | typeable6ClassKey = mkPreludeClassUnique 26 |
|---|
| 1161 | typeable7ClassKey = mkPreludeClassUnique 27 |
|---|
| 1162 | |
|---|
| 1163 | monadFixClassKey :: Unique |
|---|
| 1164 | monadFixClassKey = mkPreludeClassUnique 28 |
|---|
| 1165 | |
|---|
| 1166 | monadPlusClassKey, randomClassKey, randomGenClassKey :: Unique |
|---|
| 1167 | monadPlusClassKey = mkPreludeClassUnique 30 |
|---|
| 1168 | randomClassKey = mkPreludeClassUnique 31 |
|---|
| 1169 | randomGenClassKey = mkPreludeClassUnique 32 |
|---|
| 1170 | |
|---|
| 1171 | isStringClassKey :: Unique |
|---|
| 1172 | isStringClassKey = mkPreludeClassUnique 33 |
|---|
| 1173 | |
|---|
| 1174 | applicativeClassKey, foldableClassKey, traversableClassKey :: Unique |
|---|
| 1175 | applicativeClassKey = mkPreludeClassUnique 34 |
|---|
| 1176 | foldableClassKey = mkPreludeClassUnique 35 |
|---|
| 1177 | traversableClassKey = mkPreludeClassUnique 36 |
|---|
| 1178 | |
|---|
| 1179 | genClassKey, gen1ClassKey, datatypeClassKey, constructorClassKey, |
|---|
| 1180 | selectorClassKey :: Unique |
|---|
| 1181 | genClassKey = mkPreludeClassUnique 37 |
|---|
| 1182 | gen1ClassKey = mkPreludeClassUnique 38 |
|---|
| 1183 | |
|---|
| 1184 | datatypeClassKey = mkPreludeClassUnique 39 |
|---|
| 1185 | constructorClassKey = mkPreludeClassUnique 40 |
|---|
| 1186 | selectorClassKey = mkPreludeClassUnique 41 |
|---|
| 1187 | |
|---|
| 1188 | singIClassNameKey, typeNatLeqClassNameKey :: Unique |
|---|
| 1189 | singIClassNameKey = mkPreludeClassUnique 42 |
|---|
| 1190 | typeNatLeqClassNameKey = mkPreludeClassUnique 43 |
|---|
| 1191 | |
|---|
| 1192 | ghciIoClassKey :: Unique |
|---|
| 1193 | ghciIoClassKey = mkPreludeClassUnique 44 |
|---|
| 1194 | \end{code} |
|---|
| 1195 | |
|---|
| 1196 | %************************************************************************ |
|---|
| 1197 | %* * |
|---|
| 1198 | \subsubsection[Uniques-prelude-TyCons]{@Uniques@ for wired-in @TyCons@} |
|---|
| 1199 | %* * |
|---|
| 1200 | %************************************************************************ |
|---|
| 1201 | |
|---|
| 1202 | \begin{code} |
|---|
| 1203 | addrPrimTyConKey, arrayPrimTyConKey, arrayArrayPrimTyConKey, boolTyConKey, byteArrayPrimTyConKey, |
|---|
| 1204 | charPrimTyConKey, charTyConKey, doublePrimTyConKey, doubleTyConKey, |
|---|
| 1205 | floatPrimTyConKey, floatTyConKey, funTyConKey, intPrimTyConKey, |
|---|
| 1206 | intTyConKey, int8TyConKey, int16TyConKey, int32PrimTyConKey, |
|---|
| 1207 | int32TyConKey, int64PrimTyConKey, int64TyConKey, |
|---|
| 1208 | integerTyConKey, digitsTyConKey, |
|---|
| 1209 | listTyConKey, foreignObjPrimTyConKey, weakPrimTyConKey, |
|---|
| 1210 | mutableArrayPrimTyConKey, mutableArrayArrayPrimTyConKey, mutableByteArrayPrimTyConKey, |
|---|
| 1211 | orderingTyConKey, mVarPrimTyConKey, ratioTyConKey, rationalTyConKey, |
|---|
| 1212 | realWorldTyConKey, stablePtrPrimTyConKey, stablePtrTyConKey, |
|---|
| 1213 | anyTyConKey, eqTyConKey :: Unique |
|---|
| 1214 | addrPrimTyConKey = mkPreludeTyConUnique 1 |
|---|
| 1215 | arrayPrimTyConKey = mkPreludeTyConUnique 3 |
|---|
| 1216 | boolTyConKey = mkPreludeTyConUnique 4 |
|---|
| 1217 | byteArrayPrimTyConKey = mkPreludeTyConUnique 5 |
|---|
| 1218 | charPrimTyConKey = mkPreludeTyConUnique 7 |
|---|
| 1219 | charTyConKey = mkPreludeTyConUnique 8 |
|---|
| 1220 | doublePrimTyConKey = mkPreludeTyConUnique 9 |
|---|
| 1221 | doubleTyConKey = mkPreludeTyConUnique 10 |
|---|
| 1222 | floatPrimTyConKey = mkPreludeTyConUnique 11 |
|---|
| 1223 | floatTyConKey = mkPreludeTyConUnique 12 |
|---|
| 1224 | funTyConKey = mkPreludeTyConUnique 13 |
|---|
| 1225 | intPrimTyConKey = mkPreludeTyConUnique 14 |
|---|
| 1226 | intTyConKey = mkPreludeTyConUnique 15 |
|---|
| 1227 | int8TyConKey = mkPreludeTyConUnique 16 |
|---|
| 1228 | int16TyConKey = mkPreludeTyConUnique 17 |
|---|
| 1229 | int32PrimTyConKey = mkPreludeTyConUnique 18 |
|---|
| 1230 | int32TyConKey = mkPreludeTyConUnique 19 |
|---|
| 1231 | int64PrimTyConKey = mkPreludeTyConUnique 20 |
|---|
| 1232 | int64TyConKey = mkPreludeTyConUnique 21 |
|---|
| 1233 | integerTyConKey = mkPreludeTyConUnique 22 |
|---|
| 1234 | digitsTyConKey = mkPreludeTyConUnique 23 |
|---|
| 1235 | listTyConKey = mkPreludeTyConUnique 24 |
|---|
| 1236 | foreignObjPrimTyConKey = mkPreludeTyConUnique 25 |
|---|
| 1237 | weakPrimTyConKey = mkPreludeTyConUnique 27 |
|---|
| 1238 | mutableArrayPrimTyConKey = mkPreludeTyConUnique 28 |
|---|
| 1239 | mutableByteArrayPrimTyConKey = mkPreludeTyConUnique 29 |
|---|
| 1240 | orderingTyConKey = mkPreludeTyConUnique 30 |
|---|
| 1241 | mVarPrimTyConKey = mkPreludeTyConUnique 31 |
|---|
| 1242 | ratioTyConKey = mkPreludeTyConUnique 32 |
|---|
| 1243 | rationalTyConKey = mkPreludeTyConUnique 33 |
|---|
| 1244 | realWorldTyConKey = mkPreludeTyConUnique 34 |
|---|
| 1245 | stablePtrPrimTyConKey = mkPreludeTyConUnique 35 |
|---|
| 1246 | stablePtrTyConKey = mkPreludeTyConUnique 36 |
|---|
| 1247 | anyTyConKey = mkPreludeTyConUnique 37 |
|---|
| 1248 | eqTyConKey = mkPreludeTyConUnique 38 |
|---|
| 1249 | arrayArrayPrimTyConKey = mkPreludeTyConUnique 39 |
|---|
| 1250 | mutableArrayArrayPrimTyConKey = mkPreludeTyConUnique 40 |
|---|
| 1251 | |
|---|
| 1252 | statePrimTyConKey, stableNamePrimTyConKey, stableNameTyConKey, |
|---|
| 1253 | mutVarPrimTyConKey, ioTyConKey, |
|---|
| 1254 | wordPrimTyConKey, wordTyConKey, word8TyConKey, word16TyConKey, |
|---|
| 1255 | word32PrimTyConKey, word32TyConKey, word64PrimTyConKey, word64TyConKey, |
|---|
| 1256 | liftedConKey, unliftedConKey, anyBoxConKey, kindConKey, boxityConKey, |
|---|
| 1257 | typeConKey, threadIdPrimTyConKey, bcoPrimTyConKey, ptrTyConKey, |
|---|
| 1258 | funPtrTyConKey, tVarPrimTyConKey, eqPrimTyConKey :: Unique |
|---|
| 1259 | statePrimTyConKey = mkPreludeTyConUnique 50 |
|---|
| 1260 | stableNamePrimTyConKey = mkPreludeTyConUnique 51 |
|---|
| 1261 | stableNameTyConKey = mkPreludeTyConUnique 52 |
|---|
| 1262 | eqPrimTyConKey = mkPreludeTyConUnique 53 |
|---|
| 1263 | mutVarPrimTyConKey = mkPreludeTyConUnique 55 |
|---|
| 1264 | ioTyConKey = mkPreludeTyConUnique 56 |
|---|
| 1265 | wordPrimTyConKey = mkPreludeTyConUnique 58 |
|---|
| 1266 | wordTyConKey = mkPreludeTyConUnique 59 |
|---|
| 1267 | word8TyConKey = mkPreludeTyConUnique 60 |
|---|
| 1268 | word16TyConKey = mkPreludeTyConUnique 61 |
|---|
| 1269 | word32PrimTyConKey = mkPreludeTyConUnique 62 |
|---|
| 1270 | word32TyConKey = mkPreludeTyConUnique 63 |
|---|
| 1271 | word64PrimTyConKey = mkPreludeTyConUnique 64 |
|---|
| 1272 | word64TyConKey = mkPreludeTyConUnique 65 |
|---|
| 1273 | liftedConKey = mkPreludeTyConUnique 66 |
|---|
| 1274 | unliftedConKey = mkPreludeTyConUnique 67 |
|---|
| 1275 | anyBoxConKey = mkPreludeTyConUnique 68 |
|---|
| 1276 | kindConKey = mkPreludeTyConUnique 69 |
|---|
| 1277 | boxityConKey = mkPreludeTyConUnique 70 |
|---|
| 1278 | typeConKey = mkPreludeTyConUnique 71 |
|---|
| 1279 | threadIdPrimTyConKey = mkPreludeTyConUnique 72 |
|---|
| 1280 | bcoPrimTyConKey = mkPreludeTyConUnique 73 |
|---|
| 1281 | ptrTyConKey = mkPreludeTyConUnique 74 |
|---|
| 1282 | funPtrTyConKey = mkPreludeTyConUnique 75 |
|---|
| 1283 | tVarPrimTyConKey = mkPreludeTyConUnique 76 |
|---|
| 1284 | |
|---|
| 1285 | -- Parallel array type constructor |
|---|
| 1286 | parrTyConKey :: Unique |
|---|
| 1287 | parrTyConKey = mkPreludeTyConUnique 82 |
|---|
| 1288 | |
|---|
| 1289 | -- dotnet interop |
|---|
| 1290 | objectTyConKey :: Unique |
|---|
| 1291 | objectTyConKey = mkPreludeTyConUnique 83 |
|---|
| 1292 | |
|---|
| 1293 | eitherTyConKey :: Unique |
|---|
| 1294 | eitherTyConKey = mkPreludeTyConUnique 84 |
|---|
| 1295 | |
|---|
| 1296 | -- Super Kinds constructors |
|---|
| 1297 | superKindTyConKey :: Unique |
|---|
| 1298 | superKindTyConKey = mkPreludeTyConUnique 85 |
|---|
| 1299 | |
|---|
| 1300 | -- Kind constructors |
|---|
| 1301 | liftedTypeKindTyConKey, anyKindTyConKey, openTypeKindTyConKey, |
|---|
| 1302 | unliftedTypeKindTyConKey, ubxTupleKindTyConKey, argTypeKindTyConKey, |
|---|
| 1303 | constraintKindTyConKey :: Unique |
|---|
| 1304 | anyKindTyConKey = mkPreludeTyConUnique 86 |
|---|
| 1305 | liftedTypeKindTyConKey = mkPreludeTyConUnique 87 |
|---|
| 1306 | openTypeKindTyConKey = mkPreludeTyConUnique 88 |
|---|
| 1307 | unliftedTypeKindTyConKey = mkPreludeTyConUnique 89 |
|---|
| 1308 | ubxTupleKindTyConKey = mkPreludeTyConUnique 90 |
|---|
| 1309 | argTypeKindTyConKey = mkPreludeTyConUnique 91 |
|---|
| 1310 | constraintKindTyConKey = mkPreludeTyConUnique 92 |
|---|
| 1311 | |
|---|
| 1312 | -- Coercion constructors |
|---|
| 1313 | symCoercionTyConKey, transCoercionTyConKey, leftCoercionTyConKey, |
|---|
| 1314 | rightCoercionTyConKey, instCoercionTyConKey, unsafeCoercionTyConKey, |
|---|
| 1315 | csel1CoercionTyConKey, csel2CoercionTyConKey, cselRCoercionTyConKey |
|---|
| 1316 | :: Unique |
|---|
| 1317 | symCoercionTyConKey = mkPreludeTyConUnique 93 |
|---|
| 1318 | transCoercionTyConKey = mkPreludeTyConUnique 94 |
|---|
| 1319 | leftCoercionTyConKey = mkPreludeTyConUnique 95 |
|---|
| 1320 | rightCoercionTyConKey = mkPreludeTyConUnique 96 |
|---|
| 1321 | instCoercionTyConKey = mkPreludeTyConUnique 97 |
|---|
| 1322 | unsafeCoercionTyConKey = mkPreludeTyConUnique 98 |
|---|
| 1323 | csel1CoercionTyConKey = mkPreludeTyConUnique 99 |
|---|
| 1324 | csel2CoercionTyConKey = mkPreludeTyConUnique 100 |
|---|
| 1325 | cselRCoercionTyConKey = mkPreludeTyConUnique 101 |
|---|
| 1326 | |
|---|
| 1327 | pluginTyConKey :: Unique |
|---|
| 1328 | pluginTyConKey = mkPreludeTyConUnique 102 |
|---|
| 1329 | |
|---|
| 1330 | unknownTyConKey, unknown1TyConKey, unknown2TyConKey, unknown3TyConKey, |
|---|
| 1331 | opaqueTyConKey :: Unique |
|---|
| 1332 | unknownTyConKey = mkPreludeTyConUnique 129 |
|---|
| 1333 | unknown1TyConKey = mkPreludeTyConUnique 130 |
|---|
| 1334 | unknown2TyConKey = mkPreludeTyConUnique 131 |
|---|
| 1335 | unknown3TyConKey = mkPreludeTyConUnique 132 |
|---|
| 1336 | opaqueTyConKey = mkPreludeTyConUnique 133 |
|---|
| 1337 | |
|---|
| 1338 | stringTyConKey :: Unique |
|---|
| 1339 | stringTyConKey = mkPreludeTyConUnique 134 |
|---|
| 1340 | |
|---|
| 1341 | -- Generics (Unique keys) |
|---|
| 1342 | v1TyConKey, u1TyConKey, par1TyConKey, rec1TyConKey, |
|---|
| 1343 | k1TyConKey, m1TyConKey, sumTyConKey, prodTyConKey, |
|---|
| 1344 | compTyConKey, rTyConKey, pTyConKey, dTyConKey, |
|---|
| 1345 | cTyConKey, sTyConKey, rec0TyConKey, par0TyConKey, |
|---|
| 1346 | d1TyConKey, c1TyConKey, s1TyConKey, noSelTyConKey, |
|---|
| 1347 | repTyConKey, rep1TyConKey :: Unique |
|---|
| 1348 | |
|---|
| 1349 | v1TyConKey = mkPreludeTyConUnique 135 |
|---|
| 1350 | u1TyConKey = mkPreludeTyConUnique 136 |
|---|
| 1351 | par1TyConKey = mkPreludeTyConUnique 137 |
|---|
| 1352 | rec1TyConKey = mkPreludeTyConUnique 138 |
|---|
| 1353 | k1TyConKey = mkPreludeTyConUnique 139 |
|---|
| 1354 | m1TyConKey = mkPreludeTyConUnique 140 |
|---|
| 1355 | |
|---|
| 1356 | sumTyConKey = mkPreludeTyConUnique 141 |
|---|
| 1357 | prodTyConKey = mkPreludeTyConUnique 142 |
|---|
| 1358 | compTyConKey = mkPreludeTyConUnique 143 |
|---|
| 1359 | |
|---|
| 1360 | rTyConKey = mkPreludeTyConUnique 144 |
|---|
| 1361 | pTyConKey = mkPreludeTyConUnique 145 |
|---|
| 1362 | dTyConKey = mkPreludeTyConUnique 146 |
|---|
| 1363 | cTyConKey = mkPreludeTyConUnique 147 |
|---|
| 1364 | sTyConKey = mkPreludeTyConUnique 148 |
|---|
| 1365 | |
|---|
| 1366 | rec0TyConKey = mkPreludeTyConUnique 149 |
|---|
| 1367 | par0TyConKey = mkPreludeTyConUnique 150 |
|---|
| 1368 | d1TyConKey = mkPreludeTyConUnique 151 |
|---|
| 1369 | c1TyConKey = mkPreludeTyConUnique 152 |
|---|
| 1370 | s1TyConKey = mkPreludeTyConUnique 153 |
|---|
| 1371 | noSelTyConKey = mkPreludeTyConUnique 154 |
|---|
| 1372 | |
|---|
| 1373 | repTyConKey = mkPreludeTyConUnique 155 |
|---|
| 1374 | rep1TyConKey = mkPreludeTyConUnique 156 |
|---|
| 1375 | |
|---|
| 1376 | -- Type-level naturals |
|---|
| 1377 | typeNatKindConNameKey, typeStringKindConNameKey, |
|---|
| 1378 | typeNatAddTyFamNameKey, typeNatMulTyFamNameKey, typeNatExpTyFamNameKey |
|---|
| 1379 | :: Unique |
|---|
| 1380 | typeNatKindConNameKey = mkPreludeTyConUnique 160 |
|---|
| 1381 | typeStringKindConNameKey = mkPreludeTyConUnique 161 |
|---|
| 1382 | typeNatAddTyFamNameKey = mkPreludeTyConUnique 162 |
|---|
| 1383 | typeNatMulTyFamNameKey = mkPreludeTyConUnique 163 |
|---|
| 1384 | typeNatExpTyFamNameKey = mkPreludeTyConUnique 164 |
|---|
| 1385 | |
|---|
| 1386 | ---------------- Template Haskell ------------------- |
|---|
| 1387 | -- USES TyConUniques 200-299 |
|---|
| 1388 | ----------------------------------------------------- |
|---|
| 1389 | |
|---|
| 1390 | unitTyConKey :: Unique |
|---|
| 1391 | unitTyConKey = mkTupleTyConUnique BoxedTuple 0 |
|---|
| 1392 | \end{code} |
|---|
| 1393 | |
|---|
| 1394 | %************************************************************************ |
|---|
| 1395 | %* * |
|---|
| 1396 | \subsubsection[Uniques-prelude-DataCons]{@Uniques@ for wired-in @DataCons@} |
|---|
| 1397 | %* * |
|---|
| 1398 | %************************************************************************ |
|---|
| 1399 | |
|---|
| 1400 | \begin{code} |
|---|
| 1401 | charDataConKey, consDataConKey, doubleDataConKey, falseDataConKey, |
|---|
| 1402 | floatDataConKey, intDataConKey, nilDataConKey, ratioDataConKey, |
|---|
| 1403 | stableNameDataConKey, trueDataConKey, wordDataConKey, |
|---|
| 1404 | ioDataConKey, integerDataConKey, eqBoxDataConKey :: Unique |
|---|
| 1405 | charDataConKey = mkPreludeDataConUnique 1 |
|---|
| 1406 | consDataConKey = mkPreludeDataConUnique 2 |
|---|
| 1407 | doubleDataConKey = mkPreludeDataConUnique 3 |
|---|
| 1408 | falseDataConKey = mkPreludeDataConUnique 4 |
|---|
| 1409 | floatDataConKey = mkPreludeDataConUnique 5 |
|---|
| 1410 | intDataConKey = mkPreludeDataConUnique 6 |
|---|
| 1411 | nilDataConKey = mkPreludeDataConUnique 11 |
|---|
| 1412 | ratioDataConKey = mkPreludeDataConUnique 12 |
|---|
| 1413 | stableNameDataConKey = mkPreludeDataConUnique 14 |
|---|
| 1414 | trueDataConKey = mkPreludeDataConUnique 15 |
|---|
| 1415 | wordDataConKey = mkPreludeDataConUnique 16 |
|---|
| 1416 | ioDataConKey = mkPreludeDataConUnique 17 |
|---|
| 1417 | integerDataConKey = mkPreludeDataConUnique 18 |
|---|
| 1418 | eqBoxDataConKey = mkPreludeDataConUnique 19 |
|---|
| 1419 | |
|---|
| 1420 | -- Generic data constructors |
|---|
| 1421 | crossDataConKey, inlDataConKey, inrDataConKey, genUnitDataConKey :: Unique |
|---|
| 1422 | crossDataConKey = mkPreludeDataConUnique 20 |
|---|
| 1423 | inlDataConKey = mkPreludeDataConUnique 21 |
|---|
| 1424 | inrDataConKey = mkPreludeDataConUnique 22 |
|---|
| 1425 | genUnitDataConKey = mkPreludeDataConUnique 23 |
|---|
| 1426 | |
|---|
| 1427 | -- Data constructor for parallel arrays |
|---|
| 1428 | parrDataConKey :: Unique |
|---|
| 1429 | parrDataConKey = mkPreludeDataConUnique 24 |
|---|
| 1430 | |
|---|
| 1431 | leftDataConKey, rightDataConKey :: Unique |
|---|
| 1432 | leftDataConKey = mkPreludeDataConUnique 25 |
|---|
| 1433 | rightDataConKey = mkPreludeDataConUnique 26 |
|---|
| 1434 | |
|---|
| 1435 | ltDataConKey, eqDataConKey, gtDataConKey :: Unique |
|---|
| 1436 | ltDataConKey = mkPreludeDataConUnique 27 |
|---|
| 1437 | eqDataConKey = mkPreludeDataConUnique 28 |
|---|
| 1438 | gtDataConKey = mkPreludeDataConUnique 29 |
|---|
| 1439 | |
|---|
| 1440 | -- For integer-gmp only |
|---|
| 1441 | integerGmpSDataConKey, integerGmpJDataConKey :: Unique |
|---|
| 1442 | integerGmpSDataConKey = mkPreludeDataConUnique 30 |
|---|
| 1443 | integerGmpJDataConKey = mkPreludeDataConUnique 31 |
|---|
| 1444 | \end{code} |
|---|
| 1445 | |
|---|
| 1446 | %************************************************************************ |
|---|
| 1447 | %* * |
|---|
| 1448 | \subsubsection[Uniques-prelude-Ids]{@Uniques@ for wired-in @Ids@ (except @DataCons@)} |
|---|
| 1449 | %* * |
|---|
| 1450 | %************************************************************************ |
|---|
| 1451 | |
|---|
| 1452 | \begin{code} |
|---|
| 1453 | wildCardKey, absentErrorIdKey, augmentIdKey, appendIdKey, |
|---|
| 1454 | buildIdKey, errorIdKey, foldrIdKey, recSelErrorIdKey, |
|---|
| 1455 | seqIdKey, irrefutPatErrorIdKey, eqStringIdKey, |
|---|
| 1456 | noMethodBindingErrorIdKey, nonExhaustiveGuardsErrorIdKey, |
|---|
| 1457 | runtimeErrorIdKey, patErrorIdKey, |
|---|
| 1458 | realWorldPrimIdKey, recConErrorIdKey, |
|---|
| 1459 | unpackCStringUtf8IdKey, unpackCStringAppendIdKey, |
|---|
| 1460 | unpackCStringFoldrIdKey, unpackCStringIdKey :: Unique |
|---|
| 1461 | wildCardKey = mkPreludeMiscIdUnique 0 -- See Note [WildCard] |
|---|
| 1462 | absentErrorIdKey = mkPreludeMiscIdUnique 1 |
|---|
| 1463 | augmentIdKey = mkPreludeMiscIdUnique 2 |
|---|
| 1464 | appendIdKey = mkPreludeMiscIdUnique 3 |
|---|
| 1465 | buildIdKey = mkPreludeMiscIdUnique 4 |
|---|
| 1466 | errorIdKey = mkPreludeMiscIdUnique 5 |
|---|
| 1467 | foldrIdKey = mkPreludeMiscIdUnique 6 |
|---|
| 1468 | recSelErrorIdKey = mkPreludeMiscIdUnique 7 |
|---|
| 1469 | seqIdKey = mkPreludeMiscIdUnique 8 |
|---|
| 1470 | irrefutPatErrorIdKey = mkPreludeMiscIdUnique 9 |
|---|
| 1471 | eqStringIdKey = mkPreludeMiscIdUnique 10 |
|---|
| 1472 | noMethodBindingErrorIdKey = mkPreludeMiscIdUnique 11 |
|---|
| 1473 | nonExhaustiveGuardsErrorIdKey = mkPreludeMiscIdUnique 12 |
|---|
| 1474 | runtimeErrorIdKey = mkPreludeMiscIdUnique 13 |
|---|
| 1475 | patErrorIdKey = mkPreludeMiscIdUnique 14 |
|---|
| 1476 | realWorldPrimIdKey = mkPreludeMiscIdUnique 15 |
|---|
| 1477 | recConErrorIdKey = mkPreludeMiscIdUnique 16 |
|---|
| 1478 | unpackCStringUtf8IdKey = mkPreludeMiscIdUnique 17 |
|---|
| 1479 | unpackCStringAppendIdKey = mkPreludeMiscIdUnique 18 |
|---|
| 1480 | unpackCStringFoldrIdKey = mkPreludeMiscIdUnique 19 |
|---|
| 1481 | unpackCStringIdKey = mkPreludeMiscIdUnique 20 |
|---|
| 1482 | |
|---|
| 1483 | unsafeCoerceIdKey, concatIdKey, filterIdKey, zipIdKey, bindIOIdKey, |
|---|
| 1484 | returnIOIdKey, newStablePtrIdKey, |
|---|
| 1485 | printIdKey, failIOIdKey, nullAddrIdKey, voidArgIdKey, |
|---|
| 1486 | fstIdKey, sndIdKey, otherwiseIdKey, assertIdKey, runSTRepIdKey :: Unique |
|---|
| 1487 | unsafeCoerceIdKey = mkPreludeMiscIdUnique 30 |
|---|
| 1488 | concatIdKey = mkPreludeMiscIdUnique 31 |
|---|
| 1489 | filterIdKey = mkPreludeMiscIdUnique 32 |
|---|
| 1490 | zipIdKey = mkPreludeMiscIdUnique 33 |
|---|
| 1491 | bindIOIdKey = mkPreludeMiscIdUnique 34 |
|---|
| 1492 | returnIOIdKey = mkPreludeMiscIdUnique 35 |
|---|
| 1493 | newStablePtrIdKey = mkPreludeMiscIdUnique 36 |
|---|
| 1494 | printIdKey = mkPreludeMiscIdUnique 37 |
|---|
| 1495 | failIOIdKey = mkPreludeMiscIdUnique 38 |
|---|
| 1496 | nullAddrIdKey = mkPreludeMiscIdUnique 39 |
|---|
| 1497 | voidArgIdKey = mkPreludeMiscIdUnique 40 |
|---|
| 1498 | fstIdKey = mkPreludeMiscIdUnique 41 |
|---|
| 1499 | sndIdKey = mkPreludeMiscIdUnique 42 |
|---|
| 1500 | otherwiseIdKey = mkPreludeMiscIdUnique 43 |
|---|
| 1501 | assertIdKey = mkPreludeMiscIdUnique 44 |
|---|
| 1502 | runSTRepIdKey = mkPreludeMiscIdUnique 45 |
|---|
| 1503 | |
|---|
| 1504 | mkIntegerIdKey, smallIntegerIdKey, integerToWordIdKey, integerToIntIdKey, |
|---|
| 1505 | integerToWord64IdKey, integerToInt64IdKey, |
|---|
| 1506 | plusIntegerIdKey, timesIntegerIdKey, minusIntegerIdKey, |
|---|
| 1507 | negateIntegerIdKey, |
|---|
| 1508 | eqIntegerIdKey, neqIntegerIdKey, absIntegerIdKey, signumIntegerIdKey, |
|---|
| 1509 | leIntegerIdKey, gtIntegerIdKey, ltIntegerIdKey, geIntegerIdKey, |
|---|
| 1510 | compareIntegerIdKey, quotRemIntegerIdKey, divModIntegerIdKey, |
|---|
| 1511 | quotIntegerIdKey, remIntegerIdKey, |
|---|
| 1512 | floatFromIntegerIdKey, doubleFromIntegerIdKey, |
|---|
| 1513 | encodeFloatIntegerIdKey, encodeDoubleIntegerIdKey, |
|---|
| 1514 | gcdIntegerIdKey, lcmIntegerIdKey, |
|---|
| 1515 | andIntegerIdKey, orIntegerIdKey, xorIntegerIdKey, complementIntegerIdKey, |
|---|
| 1516 | shiftLIntegerIdKey, shiftRIntegerIdKey :: Unique |
|---|
| 1517 | mkIntegerIdKey = mkPreludeMiscIdUnique 60 |
|---|
| 1518 | smallIntegerIdKey = mkPreludeMiscIdUnique 61 |
|---|
| 1519 | integerToWordIdKey = mkPreludeMiscIdUnique 62 |
|---|
| 1520 | integerToIntIdKey = mkPreludeMiscIdUnique 63 |
|---|
| 1521 | integerToWord64IdKey = mkPreludeMiscIdUnique 64 |
|---|
| 1522 | integerToInt64IdKey = mkPreludeMiscIdUnique 65 |
|---|
| 1523 | plusIntegerIdKey = mkPreludeMiscIdUnique 66 |
|---|
| 1524 | timesIntegerIdKey = mkPreludeMiscIdUnique 67 |
|---|
| 1525 | minusIntegerIdKey = mkPreludeMiscIdUnique 68 |
|---|
| 1526 | negateIntegerIdKey = mkPreludeMiscIdUnique 69 |
|---|
| 1527 | eqIntegerIdKey = mkPreludeMiscIdUnique 70 |
|---|
| 1528 | neqIntegerIdKey = mkPreludeMiscIdUnique 71 |
|---|
| 1529 | absIntegerIdKey = mkPreludeMiscIdUnique 72 |
|---|
| 1530 | signumIntegerIdKey = mkPreludeMiscIdUnique 73 |
|---|
| 1531 | leIntegerIdKey = mkPreludeMiscIdUnique 74 |
|---|
| 1532 | gtIntegerIdKey = mkPreludeMiscIdUnique 75 |
|---|
| 1533 | ltIntegerIdKey = mkPreludeMiscIdUnique 76 |
|---|
| 1534 | geIntegerIdKey = mkPreludeMiscIdUnique 77 |
|---|
| 1535 | compareIntegerIdKey = mkPreludeMiscIdUnique 78 |
|---|
| 1536 | quotRemIntegerIdKey = mkPreludeMiscIdUnique 79 |
|---|
| 1537 | divModIntegerIdKey = mkPreludeMiscIdUnique 80 |
|---|
| 1538 | quotIntegerIdKey = mkPreludeMiscIdUnique 81 |
|---|
| 1539 | remIntegerIdKey = mkPreludeMiscIdUnique 82 |
|---|
| 1540 | floatFromIntegerIdKey = mkPreludeMiscIdUnique 83 |
|---|
| 1541 | doubleFromIntegerIdKey = mkPreludeMiscIdUnique 84 |
|---|
| 1542 | encodeFloatIntegerIdKey = mkPreludeMiscIdUnique 85 |
|---|
| 1543 | encodeDoubleIntegerIdKey = mkPreludeMiscIdUnique 86 |
|---|
| 1544 | gcdIntegerIdKey = mkPreludeMiscIdUnique 87 |
|---|
| 1545 | lcmIntegerIdKey = mkPreludeMiscIdUnique 88 |
|---|
| 1546 | andIntegerIdKey = mkPreludeMiscIdUnique 89 |
|---|
| 1547 | orIntegerIdKey = mkPreludeMiscIdUnique 90 |
|---|
| 1548 | xorIntegerIdKey = mkPreludeMiscIdUnique 91 |
|---|
| 1549 | complementIntegerIdKey = mkPreludeMiscIdUnique 92 |
|---|
| 1550 | shiftLIntegerIdKey = mkPreludeMiscIdUnique 93 |
|---|
| 1551 | shiftRIntegerIdKey = mkPreludeMiscIdUnique 94 |
|---|
| 1552 | |
|---|
| 1553 | rootMainKey, runMainKey :: Unique |
|---|
| 1554 | rootMainKey = mkPreludeMiscIdUnique 100 |
|---|
| 1555 | runMainKey = mkPreludeMiscIdUnique 101 |
|---|
| 1556 | |
|---|
| 1557 | thenIOIdKey, lazyIdKey, assertErrorIdKey :: Unique |
|---|
| 1558 | thenIOIdKey = mkPreludeMiscIdUnique 102 |
|---|
| 1559 | lazyIdKey = mkPreludeMiscIdUnique 103 |
|---|
| 1560 | assertErrorIdKey = mkPreludeMiscIdUnique 104 |
|---|
| 1561 | |
|---|
| 1562 | breakpointIdKey, breakpointCondIdKey, breakpointAutoIdKey, |
|---|
| 1563 | breakpointJumpIdKey, breakpointCondJumpIdKey, |
|---|
| 1564 | breakpointAutoJumpIdKey :: Unique |
|---|
| 1565 | breakpointIdKey = mkPreludeMiscIdUnique 110 |
|---|
| 1566 | breakpointCondIdKey = mkPreludeMiscIdUnique 111 |
|---|
| 1567 | breakpointAutoIdKey = mkPreludeMiscIdUnique 112 |
|---|
| 1568 | breakpointJumpIdKey = mkPreludeMiscIdUnique 113 |
|---|
| 1569 | breakpointCondJumpIdKey = mkPreludeMiscIdUnique 114 |
|---|
| 1570 | breakpointAutoJumpIdKey = mkPreludeMiscIdUnique 115 |
|---|
| 1571 | |
|---|
| 1572 | inlineIdKey :: Unique |
|---|
| 1573 | inlineIdKey = mkPreludeMiscIdUnique 120 |
|---|
| 1574 | |
|---|
| 1575 | mapIdKey, groupWithIdKey, dollarIdKey :: Unique |
|---|
| 1576 | mapIdKey = mkPreludeMiscIdUnique 121 |
|---|
| 1577 | groupWithIdKey = mkPreludeMiscIdUnique 122 |
|---|
| 1578 | dollarIdKey = mkPreludeMiscIdUnique 123 |
|---|
| 1579 | |
|---|
| 1580 | coercionTokenIdKey :: Unique |
|---|
| 1581 | coercionTokenIdKey = mkPreludeMiscIdUnique 124 |
|---|
| 1582 | |
|---|
| 1583 | -- dotnet interop |
|---|
| 1584 | unmarshalObjectIdKey, marshalObjectIdKey, marshalStringIdKey, |
|---|
| 1585 | unmarshalStringIdKey, checkDotnetResNameIdKey :: Unique |
|---|
| 1586 | unmarshalObjectIdKey = mkPreludeMiscIdUnique 150 |
|---|
| 1587 | marshalObjectIdKey = mkPreludeMiscIdUnique 151 |
|---|
| 1588 | marshalStringIdKey = mkPreludeMiscIdUnique 152 |
|---|
| 1589 | unmarshalStringIdKey = mkPreludeMiscIdUnique 153 |
|---|
| 1590 | checkDotnetResNameIdKey = mkPreludeMiscIdUnique 154 |
|---|
| 1591 | |
|---|
| 1592 | undefinedKey :: Unique |
|---|
| 1593 | undefinedKey = mkPreludeMiscIdUnique 155 |
|---|
| 1594 | |
|---|
| 1595 | \end{code} |
|---|
| 1596 | |
|---|
| 1597 | Certain class operations from Prelude classes. They get their own |
|---|
| 1598 | uniques so we can look them up easily when we want to conjure them up |
|---|
| 1599 | during type checking. |
|---|
| 1600 | |
|---|
| 1601 | \begin{code} |
|---|
| 1602 | -- Just a place holder for unbound variables produced by the renamer: |
|---|
| 1603 | unboundKey :: Unique |
|---|
| 1604 | unboundKey = mkPreludeMiscIdUnique 160 |
|---|
| 1605 | |
|---|
| 1606 | fromIntegerClassOpKey, minusClassOpKey, fromRationalClassOpKey, |
|---|
| 1607 | enumFromClassOpKey, enumFromThenClassOpKey, enumFromToClassOpKey, |
|---|
| 1608 | enumFromThenToClassOpKey, eqClassOpKey, geClassOpKey, negateClassOpKey, |
|---|
| 1609 | failMClassOpKey, bindMClassOpKey, thenMClassOpKey, returnMClassOpKey, |
|---|
| 1610 | fmapClassOpKey |
|---|
| 1611 | :: Unique |
|---|
| 1612 | fromIntegerClassOpKey = mkPreludeMiscIdUnique 160 |
|---|
| 1613 | minusClassOpKey = mkPreludeMiscIdUnique 161 |
|---|
| 1614 | fromRationalClassOpKey = mkPreludeMiscIdUnique 162 |
|---|
| 1615 | enumFromClassOpKey = mkPreludeMiscIdUnique 163 |
|---|
| 1616 | enumFromThenClassOpKey = mkPreludeMiscIdUnique 164 |
|---|
| 1617 | enumFromToClassOpKey = mkPreludeMiscIdUnique 165 |
|---|
| 1618 | enumFromThenToClassOpKey = mkPreludeMiscIdUnique 166 |
|---|
| 1619 | eqClassOpKey = mkPreludeMiscIdUnique 167 |
|---|
| 1620 | geClassOpKey = mkPreludeMiscIdUnique 168 |
|---|
| 1621 | negateClassOpKey = mkPreludeMiscIdUnique 169 |
|---|
| 1622 | failMClassOpKey = mkPreludeMiscIdUnique 170 |
|---|
| 1623 | bindMClassOpKey = mkPreludeMiscIdUnique 171 -- (>>=) |
|---|
| 1624 | thenMClassOpKey = mkPreludeMiscIdUnique 172 -- (>>) |
|---|
| 1625 | fmapClassOpKey = mkPreludeMiscIdUnique 173 |
|---|
| 1626 | returnMClassOpKey = mkPreludeMiscIdUnique 174 |
|---|
| 1627 | |
|---|
| 1628 | -- Recursive do notation |
|---|
| 1629 | mfixIdKey :: Unique |
|---|
| 1630 | mfixIdKey = mkPreludeMiscIdUnique 175 |
|---|
| 1631 | |
|---|
| 1632 | -- Arrow notation |
|---|
| 1633 | arrAIdKey, composeAIdKey, firstAIdKey, appAIdKey, choiceAIdKey, |
|---|
| 1634 | loopAIdKey :: Unique |
|---|
| 1635 | arrAIdKey = mkPreludeMiscIdUnique 180 |
|---|
| 1636 | composeAIdKey = mkPreludeMiscIdUnique 181 -- >>> |
|---|
| 1637 | firstAIdKey = mkPreludeMiscIdUnique 182 |
|---|
| 1638 | appAIdKey = mkPreludeMiscIdUnique 183 |
|---|
| 1639 | choiceAIdKey = mkPreludeMiscIdUnique 184 -- ||| |
|---|
| 1640 | loopAIdKey = mkPreludeMiscIdUnique 185 |
|---|
| 1641 | |
|---|
| 1642 | fromStringClassOpKey :: Unique |
|---|
| 1643 | fromStringClassOpKey = mkPreludeMiscIdUnique 186 |
|---|
| 1644 | |
|---|
| 1645 | -- Annotation type checking |
|---|
| 1646 | toAnnotationWrapperIdKey :: Unique |
|---|
| 1647 | toAnnotationWrapperIdKey = mkPreludeMiscIdUnique 187 |
|---|
| 1648 | |
|---|
| 1649 | -- Conversion functions |
|---|
| 1650 | fromIntegralIdKey, realToFracIdKey, toIntegerClassOpKey, toRationalClassOpKey :: Unique |
|---|
| 1651 | fromIntegralIdKey = mkPreludeMiscIdUnique 190 |
|---|
| 1652 | realToFracIdKey = mkPreludeMiscIdUnique 191 |
|---|
| 1653 | toIntegerClassOpKey = mkPreludeMiscIdUnique 192 |
|---|
| 1654 | toRationalClassOpKey = mkPreludeMiscIdUnique 193 |
|---|
| 1655 | |
|---|
| 1656 | -- Monad comprehensions |
|---|
| 1657 | guardMIdKey, liftMIdKey, mzipIdKey :: Unique |
|---|
| 1658 | guardMIdKey = mkPreludeMiscIdUnique 194 |
|---|
| 1659 | liftMIdKey = mkPreludeMiscIdUnique 195 |
|---|
| 1660 | mzipIdKey = mkPreludeMiscIdUnique 196 |
|---|
| 1661 | |
|---|
| 1662 | -- GHCi |
|---|
| 1663 | ghciStepIoMClassOpKey :: Unique |
|---|
| 1664 | ghciStepIoMClassOpKey = mkPreludeMiscIdUnique 197 |
|---|
| 1665 | |
|---|
| 1666 | |
|---|
| 1667 | ---------------- Template Haskell ------------------- |
|---|
| 1668 | -- USES IdUniques 200-499 |
|---|
| 1669 | ----------------------------------------------------- |
|---|
| 1670 | \end{code} |
|---|
| 1671 | |
|---|
| 1672 | %************************************************************************ |
|---|
| 1673 | %* * |
|---|
| 1674 | \subsection[Class-std-groups]{Standard groups of Prelude classes} |
|---|
| 1675 | %* * |
|---|
| 1676 | %************************************************************************ |
|---|
| 1677 | |
|---|
| 1678 | NOTE: @Eq@ and @Text@ do need to appear in @standardClasses@ |
|---|
| 1679 | even though every numeric class has these two as a superclass, |
|---|
| 1680 | because the list of ambiguous dictionaries hasn't been simplified. |
|---|
| 1681 | |
|---|
| 1682 | \begin{code} |
|---|
| 1683 | numericClassKeys :: [Unique] |
|---|
| 1684 | numericClassKeys = |
|---|
| 1685 | [ numClassKey |
|---|
| 1686 | , realClassKey |
|---|
| 1687 | , integralClassKey |
|---|
| 1688 | ] |
|---|
| 1689 | ++ fractionalClassKeys |
|---|
| 1690 | |
|---|
| 1691 | fractionalClassKeys :: [Unique] |
|---|
| 1692 | fractionalClassKeys = |
|---|
| 1693 | [ fractionalClassKey |
|---|
| 1694 | , floatingClassKey |
|---|
| 1695 | , realFracClassKey |
|---|
| 1696 | , realFloatClassKey |
|---|
| 1697 | ] |
|---|
| 1698 | |
|---|
| 1699 | -- The "standard classes" are used in defaulting (Haskell 98 report 4.3.4), |
|---|
| 1700 | -- and are: "classes defined in the Prelude or a standard library" |
|---|
| 1701 | standardClassKeys :: [Unique] |
|---|
| 1702 | standardClassKeys = derivableClassKeys ++ numericClassKeys |
|---|
| 1703 | ++ [randomClassKey, randomGenClassKey, |
|---|
| 1704 | functorClassKey, |
|---|
| 1705 | monadClassKey, monadPlusClassKey, |
|---|
| 1706 | isStringClassKey, |
|---|
| 1707 | applicativeClassKey, foldableClassKey, traversableClassKey |
|---|
| 1708 | ] |
|---|
| 1709 | \end{code} |
|---|
| 1710 | |
|---|
| 1711 | @derivableClassKeys@ is also used in checking \tr{deriving} constructs |
|---|
| 1712 | (@TcDeriv@). |
|---|
| 1713 | |
|---|
| 1714 | \begin{code} |
|---|
| 1715 | derivableClassKeys :: [Unique] |
|---|
| 1716 | derivableClassKeys |
|---|
| 1717 | = [ eqClassKey, ordClassKey, enumClassKey, ixClassKey, |
|---|
| 1718 | boundedClassKey, showClassKey, readClassKey ] |
|---|
| 1719 | \end{code} |
|---|