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