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