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