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