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