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