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