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