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