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