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