2 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
4 \section[PrelNames]{Definitions of prelude modules and names}
7 Nota Bene: all Names defined in here should come from the base package
9 * ModuleNames for prelude modules,
10 e.g. pREL_BASE_Name :: ModuleName
12 * Modules for prelude modules
13 e.g. pREL_Base :: Module
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
20 * Names for Ids, DataCons, TyCons and Classes that the compiler
21 "knows about" in some way
22 e.g. intTyConName :: Name
24 One of these Names contains
25 (a) the module and occurrence name of the thing
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.
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
40 Unique, Uniquable(..), hasKey, -- Re-exported for convenience
42 -----------------------------------------------------------
43 module PrelNames, -- A huge bunch of (a) Names, e.g. intTyConName
44 -- (b) Uniques e.g. intTyConKey
45 -- (c) Groups of classes and types
46 -- (d) miscellaneous things
47 -- So many that we export them all
50 #include "HsVersions.h"
52 import Module ( ModuleName, mkBasePkgModule, mkHomeModule, mkModuleName )
53 import OccName ( UserFS, dataName, tcName, clsName, varName,
57 import RdrName ( RdrName, nameRdrName, mkOrig, rdrNameOcc )
58 import Unique ( Unique, Uniquable(..), hasKey,
59 mkPreludeMiscIdUnique, mkPreludeDataConUnique,
60 mkPreludeTyConUnique, mkPreludeClassUnique,
61 mkTupleTyConUnique, isTupleKey
63 import BasicTypes ( Boxity(..) )
64 import Name ( Name, mkInternalName, mkKnownKeyExternalName, mkWiredInName, nameUnique )
65 import SrcLoc ( noSrcLoc )
66 import Util ( nOfThem )
67 import Panic ( panic )
74 %************************************************************************
76 \subsection{Local Names}
78 %************************************************************************
80 This *local* name is used by the interactive stuff
83 itName uniq = mkInternalName uniq (mkOccFS varName FSLIT("it")) noSrcLoc
87 -- mkUnboundName makes a place-holder Name; it shouldn't be looked at except possibly
88 -- during compiler debugging.
89 mkUnboundName :: RdrName -> Name
90 mkUnboundName rdr_name = mkInternalName unboundKey (rdrNameOcc rdr_name) noSrcLoc
92 isUnboundName :: Name -> Bool
93 isUnboundName name = name `hasKey` unboundKey
97 %************************************************************************
99 \subsection{Built-in-syntax names
101 %************************************************************************
103 Built-in syntax names are parsed directly into Exact RdrNames.
104 This predicate just identifies them.
107 isBuiltInSyntaxName :: Name -> Bool
108 isBuiltInSyntaxName n
110 || uniq `elem` [listTyConKey, nilDataConKey, consDataConKey,
111 funTyConKey, parrTyConKey]
116 %************************************************************************
118 \subsection{Known key Names}
120 %************************************************************************
122 This section tells what the compiler knows about the assocation of
123 names with uniques. These ones are the *non* wired-in ones. The
124 wired in ones are defined in TysWiredIn etc.
127 basicKnownKeyNames :: [Name]
129 = [ -- Type constructors (synonyms especially)
130 ioTyConName, ioDataConName,
137 mutableByteArrayTyConName,
140 -- Classes. *Must* include:
141 -- classes that are grabbed by key (e.g., eqClassKey)
142 -- classes in "Class.standardClassKeys" (quite a few)
143 eqClassName, -- mentioned, derivable
144 ordClassName, -- derivable
145 boundedClassName, -- derivable
146 numClassName, -- mentioned, numeric
147 enumClassName, -- derivable
150 realClassName, -- numeric
151 integralClassName, -- numeric
152 fractionalClassName, -- numeric
153 floatingClassName, -- numeric
154 realFracClassName, -- numeric
155 realFloatClassName, -- numeric
156 cCallableClassName, -- mentioned, ccallish
157 cReturnableClassName, -- mentioned, ccallish
162 negateName, minusName,
163 fromRationalName, fromIntegerName,
167 enumFromName, enumFromThenName,
168 enumFromThenToName, enumFromToName,
169 enumFromToPName, enumFromThenToPName,
172 thenMName, bindMName, returnMName, failMName,
173 thenIOName, bindIOName, returnIOName, failIOName,
179 arrAName, composeAName, firstAName,
180 appAName, choiceAName, loopAName,
195 unpackCStringName, unpackCStringAppendName,
196 unpackCStringFoldrName, unpackCStringUtf8Name,
199 concatName, filterName,
200 zipName, foldrName, buildName, augmentName, appendName,
202 -- Parallel array operations
203 nullPName, lengthPName, replicatePName, mapPName,
204 filterPName, zipPName, crossPName, indexPName,
205 toPName, bpermutePName, bpermuteDftPName, indexOfPName,
207 -- FFI primitive types that are not wired-in.
208 stablePtrTyConName, ptrTyConName, funPtrTyConName, addrTyConName,
209 int8TyConName, int16TyConName, int32TyConName, int64TyConName,
210 word8TyConName, word16TyConName, word32TyConName, word64TyConName,
213 unsafeCoerceName, otherwiseIdName,
214 plusIntegerName, timesIntegerName,
215 eqStringName, assertName, assertErrorName, runSTRepName,
216 printName, splitName, fstName, sndName,
223 , eitherTyConName, leftDataConName, rightDataConName
226 , objectTyConName, marshalObjectName, unmarshalObjectName
227 , marshalStringName, unmarshalStringName, checkDotnetResName
230 monadNames :: [Name] -- The monad ops need by a HsDo
231 monadNames = [returnMName, failMName, bindMName, thenMName]
235 %************************************************************************
237 \subsection{Module names}
239 %************************************************************************
242 --MetaHaskell Extension Add a new module here
244 pRELUDE_Name = mkModuleName "Prelude"
245 gHC_PRIM_Name = mkModuleName "GHC.Prim" -- Primitive types and values
246 pREL_BASE_Name = mkModuleName "GHC.Base"
247 pREL_ENUM_Name = mkModuleName "GHC.Enum"
248 pREL_SHOW_Name = mkModuleName "GHC.Show"
249 pREL_READ_Name = mkModuleName "GHC.Read"
250 pREL_NUM_Name = mkModuleName "GHC.Num"
251 pREL_LIST_Name = mkModuleName "GHC.List"
252 pREL_PARR_Name = mkModuleName "GHC.PArr"
253 pREL_TUP_Name = mkModuleName "Data.Tuple"
254 pREL_EITHER_Name = mkModuleName "Data.Either"
255 pREL_PACK_Name = mkModuleName "GHC.Pack"
256 pREL_CONC_Name = mkModuleName "GHC.Conc"
257 pREL_IO_BASE_Name = mkModuleName "GHC.IOBase"
258 pREL_ST_Name = mkModuleName "GHC.ST"
259 pREL_ARR_Name = mkModuleName "GHC.Arr"
260 pREL_BYTEARR_Name = mkModuleName "PrelByteArr"
261 pREL_STABLE_Name = mkModuleName "GHC.Stable"
262 pREL_ADDR_Name = mkModuleName "GHC.Addr"
263 pREL_PTR_Name = mkModuleName "GHC.Ptr"
264 pREL_ERR_Name = mkModuleName "GHC.Err"
265 pREL_REAL_Name = mkModuleName "GHC.Real"
266 pREL_FLOAT_Name = mkModuleName "GHC.Float"
267 pREL_TOP_HANDLER_Name = mkModuleName "GHC.TopHandler"
268 sYSTEM_IO_Name = mkModuleName "System.IO"
269 dYNAMIC_Name = mkModuleName "Data.Dynamic"
270 tRAVERSE_Name = mkModuleName "Data.Traverse"
271 gENERICS_Name = mkModuleName "Data.Generics"
272 dOTNET_Name = mkModuleName "GHC.Dotnet"
274 rEAD_PREC_Name = mkModuleName "Text.ParserCombinators.ReadPrec"
275 lEX_Name = mkModuleName "Text.Read.Lex"
277 mAIN_Name = mkModuleName "Main"
278 pREL_INT_Name = mkModuleName "GHC.Int"
279 pREL_WORD_Name = mkModuleName "GHC.Word"
280 mONAD_FIX_Name = mkModuleName "Control.Monad.Fix"
281 aRROW_Name = mkModuleName "Control.Arrow"
282 aDDR_Name = mkModuleName "Addr"
284 gLA_EXTS_Name = mkModuleName "GHC.Exts"
286 gHC_PRIM = mkBasePkgModule gHC_PRIM_Name
287 pREL_BASE = mkBasePkgModule pREL_BASE_Name
288 pREL_ADDR = mkBasePkgModule pREL_ADDR_Name
289 pREL_PTR = mkBasePkgModule pREL_PTR_Name
290 pREL_STABLE = mkBasePkgModule pREL_STABLE_Name
291 pREL_IO_BASE = mkBasePkgModule pREL_IO_BASE_Name
292 pREL_PACK = mkBasePkgModule pREL_PACK_Name
293 pREL_ERR = mkBasePkgModule pREL_ERR_Name
294 pREL_NUM = mkBasePkgModule pREL_NUM_Name
295 pREL_REAL = mkBasePkgModule pREL_REAL_Name
296 pREL_FLOAT = mkBasePkgModule pREL_FLOAT_Name
297 pRELUDE = mkBasePkgModule pRELUDE_Name
299 -- MetaHaskell Extension text2 from Meta/work/gen.hs
300 mETA_META_Name = mkModuleName "Language.Haskell.THSyntax"
302 rOOT_MAIN_Name = mkModuleName ":Main" -- Root module for initialisation
303 rOOT_MAIN = mkHomeModule rOOT_MAIN_Name
304 -- The ':xxx' makes a moudle name that the user can never
305 -- use himself. The z-encoding for ':' is "ZC", so the z-encoded
306 -- module name still starts with a capital letter, which keeps
307 -- the z-encoded version consistent.
308 iNTERACTIVE = mkHomeModule (mkModuleName ":Interactive")
311 %************************************************************************
313 \subsection{Constructing the names of tuples
315 %************************************************************************
318 mkTupNameStr :: Boxity -> Int -> (ModuleName, UserFS)
320 mkTupNameStr Boxed 0 = (pREL_BASE_Name, FSLIT("()"))
321 mkTupNameStr Boxed 1 = panic "Name.mkTupNameStr: 1 ???"
322 mkTupNameStr Boxed 2 = (pREL_TUP_Name, mkFastString "(,)") -- not strictly necessary
323 mkTupNameStr Boxed 3 = (pREL_TUP_Name, mkFastString "(,,)") -- ditto
324 mkTupNameStr Boxed 4 = (pREL_TUP_Name, mkFastString "(,,,)") -- ditto
325 mkTupNameStr Boxed n = (pREL_TUP_Name, mkFastString ("(" ++ nOfThem (n-1) ',' ++ ")"))
327 mkTupNameStr Unboxed 0 = panic "Name.mkUbxTupNameStr: 0 ???"
328 mkTupNameStr Unboxed 1 = (gHC_PRIM_Name, mkFastString "(# #)") -- 1 and 0 both make sense!!!
329 mkTupNameStr Unboxed 2 = (gHC_PRIM_Name, mkFastString "(#,#)")
330 mkTupNameStr Unboxed 3 = (gHC_PRIM_Name, mkFastString "(#,,#)")
331 mkTupNameStr Unboxed 4 = (gHC_PRIM_Name, mkFastString "(#,,,#)")
332 mkTupNameStr Unboxed n = (gHC_PRIM_Name, mkFastString ("(#" ++ nOfThem (n-1) ',' ++ "#)"))
336 %************************************************************************
340 %************************************************************************
343 eq_RDR = nameRdrName eqName
344 ge_RDR = nameRdrName geName
345 ne_RDR = varQual_RDR pREL_BASE_Name FSLIT("/=")
346 le_RDR = varQual_RDR pREL_BASE_Name FSLIT("<=")
347 gt_RDR = varQual_RDR pREL_BASE_Name FSLIT(">")
348 compare_RDR = varQual_RDR pREL_BASE_Name FSLIT("compare")
349 ltTag_RDR = dataQual_RDR pREL_BASE_Name FSLIT("LT")
350 eqTag_RDR = dataQual_RDR pREL_BASE_Name FSLIT("EQ")
351 gtTag_RDR = dataQual_RDR pREL_BASE_Name FSLIT("GT")
353 eqClass_RDR = nameRdrName eqClassName
354 numClass_RDR = nameRdrName numClassName
355 ordClass_RDR = nameRdrName ordClassName
356 enumClass_RDR = nameRdrName enumClassName
357 monadClass_RDR = nameRdrName monadClassName
358 cCallableClass_RDR = nameRdrName cCallableClassName
359 cReturnableClass_RDR = nameRdrName cReturnableClassName
361 map_RDR = varQual_RDR pREL_BASE_Name FSLIT("map")
362 append_RDR = varQual_RDR pREL_BASE_Name FSLIT("++")
364 foldr_RDR = nameRdrName foldrName
365 build_RDR = nameRdrName buildName
366 returnM_RDR = nameRdrName returnMName
367 bindM_RDR = nameRdrName bindMName
368 failM_RDR = nameRdrName failMName
370 false_RDR = nameRdrName falseDataConName
371 true_RDR = nameRdrName trueDataConName
372 and_RDR = nameRdrName andName
374 left_RDR = nameRdrName leftDataConName
375 right_RDR = nameRdrName rightDataConName
377 error_RDR = nameRdrName errorName
379 fromEnum_RDR = varQual_RDR pREL_ENUM_Name FSLIT("fromEnum")
380 toEnum_RDR = varQual_RDR pREL_ENUM_Name FSLIT("toEnum")
381 mkInt_RDR = nameRdrName intDataConName
383 enumFrom_RDR = nameRdrName enumFromName
384 enumFromTo_RDR = nameRdrName enumFromToName
385 enumFromThen_RDR = nameRdrName enumFromThenName
386 enumFromThenTo_RDR = nameRdrName enumFromThenToName
388 ratioDataCon_RDR = nameRdrName ratioDataConName
389 plusInteger_RDR = nameRdrName plusIntegerName
390 timesInteger_RDR = nameRdrName timesIntegerName
392 ioDataCon_RDR = nameRdrName ioDataConName
394 eqString_RDR = nameRdrName eqStringName
395 unpackCString_RDR = nameRdrName unpackCStringName
396 unpackCStringFoldr_RDR = nameRdrName unpackCStringFoldrName
397 unpackCStringUtf8_RDR = nameRdrName unpackCStringUtf8Name
399 newStablePtr_RDR = nameRdrName newStablePtrName
400 addrDataCon_RDR = dataQual_RDR aDDR_Name FSLIT("A#")
402 bindIO_RDR = nameRdrName bindIOName
403 returnIO_RDR = nameRdrName returnIOName
405 fromInteger_RDR = nameRdrName fromIntegerName
406 fromRational_RDR = nameRdrName fromRationalName
407 minus_RDR = nameRdrName minusName
408 times_RDR = varQual_RDR pREL_NUM_Name FSLIT("*")
409 plus_RDR = varQual_RDR pREL_NUM_Name FSLIT("+")
411 compose_RDR = varQual_RDR pREL_BASE_Name FSLIT(".")
413 not_RDR = varQual_RDR pREL_BASE_Name FSLIT("not")
414 getTag_RDR = varQual_RDR pREL_BASE_Name FSLIT("getTag")
415 succ_RDR = varQual_RDR pREL_ENUM_Name FSLIT("succ")
416 pred_RDR = varQual_RDR pREL_ENUM_Name FSLIT("pred")
417 minBound_RDR = varQual_RDR pREL_ENUM_Name FSLIT("minBound")
418 maxBound_RDR = varQual_RDR pREL_ENUM_Name FSLIT("maxBound")
419 range_RDR = varQual_RDR pREL_ARR_Name FSLIT("range")
420 inRange_RDR = varQual_RDR pREL_ARR_Name FSLIT("inRange")
421 index_RDR = varQual_RDR pREL_ARR_Name FSLIT("index")
423 readList_RDR = varQual_RDR pREL_READ_Name FSLIT("readList")
424 readListDefault_RDR = varQual_RDR pREL_READ_Name FSLIT("readListDefault")
425 readListPrec_RDR = varQual_RDR pREL_READ_Name FSLIT("readListPrec")
426 readListPrecDefault_RDR = varQual_RDR pREL_READ_Name FSLIT("readListPrecDefault")
427 readPrec_RDR = varQual_RDR pREL_READ_Name FSLIT("readPrec")
428 parens_RDR = varQual_RDR pREL_READ_Name FSLIT("parens")
429 choose_RDR = varQual_RDR pREL_READ_Name FSLIT("choose")
430 lexP_RDR = varQual_RDR pREL_READ_Name FSLIT("lexP")
432 punc_RDR = dataQual_RDR lEX_Name FSLIT("Punc")
433 ident_RDR = dataQual_RDR lEX_Name FSLIT("Ident")
434 symbol_RDR = dataQual_RDR lEX_Name FSLIT("Symbol")
436 step_RDR = varQual_RDR rEAD_PREC_Name FSLIT("step")
437 alt_RDR = varQual_RDR rEAD_PREC_Name FSLIT("+++")
438 reset_RDR = varQual_RDR rEAD_PREC_Name FSLIT("reset")
439 prec_RDR = varQual_RDR rEAD_PREC_Name FSLIT("prec")
441 showList_RDR = varQual_RDR pREL_SHOW_Name FSLIT("showList")
442 showList___RDR = varQual_RDR pREL_SHOW_Name FSLIT("showList__")
443 showsPrec_RDR = varQual_RDR pREL_SHOW_Name FSLIT("showsPrec")
444 showString_RDR = varQual_RDR pREL_SHOW_Name FSLIT("showString")
445 showSpace_RDR = varQual_RDR pREL_SHOW_Name FSLIT("showSpace")
446 showParen_RDR = varQual_RDR pREL_SHOW_Name FSLIT("showParen")
448 typeOf_RDR = varQual_RDR dYNAMIC_Name FSLIT("typeOf")
449 mkTypeRep_RDR = varQual_RDR dYNAMIC_Name FSLIT("mkAppTy")
450 mkTyConRep_RDR = varQual_RDR dYNAMIC_Name FSLIT("mkTyCon")
452 constr_RDR = dataQual_RDR gENERICS_Name FSLIT("Constr")
453 gfoldl_RDR = varQual_RDR gENERICS_Name FSLIT("gfoldl")
454 gfoldr_RDR = varQual_RDR gENERICS_Name FSLIT("gfoldr")
455 gunfold_RDR = varQual_RDR gENERICS_Name FSLIT("gunfold")
456 gmapT_RDR = varQual_RDR gENERICS_Name FSLIT("gmapT")
457 gmapQ_RDR = varQual_RDR gENERICS_Name FSLIT("gmapQ")
458 gmapM_RDR = varQual_RDR gENERICS_Name FSLIT("gmapM")
459 conOf_RDR = varQual_RDR gENERICS_Name FSLIT("conOf")
460 consOf_RDR = varQual_RDR gENERICS_Name FSLIT("consOf")
462 undefined_RDR = varQual_RDR pREL_ERR_Name FSLIT("undefined")
466 %************************************************************************
468 \subsection{Known-key names}
470 %************************************************************************
472 Many of these Names are not really "built in", but some parts of the
473 compiler (notably the deriving mechanism) need to mention their names,
474 and it's convenient to write them all down in one place.
476 --MetaHaskell Extension add the constrs and the lower case case
477 -- guys as well (perhaps) e.g. see trueDataConName below
481 rootMainName = varQual rOOT_MAIN_Name FSLIT("main") rootMainKey
482 runIOName = varQual pREL_TOP_HANDLER_Name FSLIT("runIO") runMainKey
484 -- Stuff from GHC.Prim
485 superKindName = kindQual FSLIT("KX") kindConKey
486 superBoxityName = kindQual FSLIT("BX") boxityConKey
487 liftedConName = kindQual FSLIT("*") liftedConKey
488 unliftedConName = kindQual FSLIT("#") unliftedConKey
489 openKindConName = kindQual FSLIT("?") anyBoxConKey
490 typeConName = kindQual FSLIT("Type") typeConKey
492 funTyConName = tcQual gHC_PRIM_Name FSLIT("(->)") funTyConKey
493 charPrimTyConName = tcQual gHC_PRIM_Name FSLIT("Char#") charPrimTyConKey
494 intPrimTyConName = tcQual gHC_PRIM_Name FSLIT("Int#") intPrimTyConKey
495 int32PrimTyConName = tcQual gHC_PRIM_Name FSLIT("Int32#") int32PrimTyConKey
496 int64PrimTyConName = tcQual gHC_PRIM_Name FSLIT("Int64#") int64PrimTyConKey
497 wordPrimTyConName = tcQual gHC_PRIM_Name FSLIT("Word#") wordPrimTyConKey
498 word32PrimTyConName = tcQual gHC_PRIM_Name FSLIT("Word32#") word32PrimTyConKey
499 word64PrimTyConName = tcQual gHC_PRIM_Name FSLIT("Word64#") word64PrimTyConKey
500 addrPrimTyConName = tcQual gHC_PRIM_Name FSLIT("Addr#") addrPrimTyConKey
501 floatPrimTyConName = tcQual gHC_PRIM_Name FSLIT("Float#") floatPrimTyConKey
502 doublePrimTyConName = tcQual gHC_PRIM_Name FSLIT("Double#") doublePrimTyConKey
503 statePrimTyConName = tcQual gHC_PRIM_Name FSLIT("State#") statePrimTyConKey
504 realWorldTyConName = tcQual gHC_PRIM_Name FSLIT("RealWorld") realWorldTyConKey
505 arrayPrimTyConName = tcQual gHC_PRIM_Name FSLIT("Array#") arrayPrimTyConKey
506 byteArrayPrimTyConName = tcQual gHC_PRIM_Name FSLIT("ByteArray#") byteArrayPrimTyConKey
507 mutableArrayPrimTyConName = tcQual gHC_PRIM_Name FSLIT("MutableArray#") mutableArrayPrimTyConKey
508 mutableByteArrayPrimTyConName = tcQual gHC_PRIM_Name FSLIT("MutableByteArray#") mutableByteArrayPrimTyConKey
509 mutVarPrimTyConName = tcQual gHC_PRIM_Name FSLIT("MutVar#") mutVarPrimTyConKey
510 mVarPrimTyConName = tcQual gHC_PRIM_Name FSLIT("MVar#") mVarPrimTyConKey
511 stablePtrPrimTyConName = tcQual gHC_PRIM_Name FSLIT("StablePtr#") stablePtrPrimTyConKey
512 stableNamePrimTyConName = tcQual gHC_PRIM_Name FSLIT("StableName#") stableNamePrimTyConKey
513 foreignObjPrimTyConName = tcQual gHC_PRIM_Name FSLIT("ForeignObj#") foreignObjPrimTyConKey
514 bcoPrimTyConName = tcQual gHC_PRIM_Name FSLIT("BCO#") bcoPrimTyConKey
515 weakPrimTyConName = tcQual gHC_PRIM_Name FSLIT("Weak#") weakPrimTyConKey
516 threadIdPrimTyConName = tcQual gHC_PRIM_Name FSLIT("ThreadId#") threadIdPrimTyConKey
517 cCallableClassName = clsQual gHC_PRIM_Name FSLIT("CCallable") cCallableClassKey
518 cReturnableClassName = clsQual gHC_PRIM_Name FSLIT("CReturnable") cReturnableClassKey
520 unsafeCoerceName = wVarQual gHC_PRIM_Name FSLIT("unsafeCoerce#") unsafeCoerceIdKey
521 nullAddrName = wVarQual gHC_PRIM_Name FSLIT("nullAddr#") nullAddrIdKey
522 seqName = wVarQual gHC_PRIM_Name FSLIT("seq") seqIdKey
523 realWorldName = wVarQual gHC_PRIM_Name FSLIT("realWorld#") realWorldPrimIdKey
525 -- PrelBase data types and constructors
526 charTyConName = wTcQual pREL_BASE_Name FSLIT("Char") charTyConKey
527 charDataConName = wDataQual pREL_BASE_Name FSLIT("C#") charDataConKey
528 intTyConName = wTcQual pREL_BASE_Name FSLIT("Int") intTyConKey
529 intDataConName = wDataQual pREL_BASE_Name FSLIT("I#") intDataConKey
530 orderingTyConName = tcQual pREL_BASE_Name FSLIT("Ordering") orderingTyConKey
531 boolTyConName = wTcQual pREL_BASE_Name FSLIT("Bool") boolTyConKey
532 falseDataConName = wDataQual pREL_BASE_Name FSLIT("False") falseDataConKey
533 trueDataConName = wDataQual pREL_BASE_Name FSLIT("True") trueDataConKey
534 listTyConName = wTcQual pREL_BASE_Name FSLIT("[]") listTyConKey
535 nilDataConName = wDataQual pREL_BASE_Name FSLIT("[]") nilDataConKey
536 consDataConName = wDataQual pREL_BASE_Name FSLIT(":") consDataConKey
537 eqName = varQual pREL_BASE_Name FSLIT("==") eqClassOpKey
538 geName = varQual pREL_BASE_Name FSLIT(">=") geClassOpKey
540 eitherTyConName = tcQual pREL_EITHER_Name FSLIT("Either") eitherTyConKey
541 leftDataConName = dataQual pREL_EITHER_Name FSLIT("Left") leftDataConKey
542 rightDataConName = dataQual pREL_EITHER_Name FSLIT("Right") rightDataConKey
545 crossTyConName = tcQual pREL_BASE_Name FSLIT(":*:") crossTyConKey
546 crossDataConName = dataQual pREL_BASE_Name FSLIT(":*:") crossDataConKey
547 plusTyConName = wTcQual pREL_BASE_Name FSLIT(":+:") plusTyConKey
548 inlDataConName = wDataQual pREL_BASE_Name FSLIT("Inl") inlDataConKey
549 inrDataConName = wDataQual pREL_BASE_Name FSLIT("Inr") inrDataConKey
550 genUnitTyConName = wTcQual pREL_BASE_Name FSLIT("Unit") genUnitTyConKey
551 genUnitDataConName = wDataQual pREL_BASE_Name FSLIT("Unit") genUnitDataConKey
553 -- Base strings Strings
554 unpackCStringName = varQual pREL_BASE_Name FSLIT("unpackCString#") unpackCStringIdKey
555 unpackCStringAppendName = varQual pREL_BASE_Name FSLIT("unpackAppendCString#") unpackCStringAppendIdKey
556 unpackCStringFoldrName = varQual pREL_BASE_Name FSLIT("unpackFoldrCString#") unpackCStringFoldrIdKey
557 unpackCStringUtf8Name = varQual pREL_BASE_Name FSLIT("unpackCStringUtf8#") unpackCStringUtf8IdKey
558 eqStringName = varQual pREL_BASE_Name FSLIT("eqString") eqStringIdKey
560 -- Base classes (Eq, Ord, Functor)
561 eqClassName = clsQual pREL_BASE_Name FSLIT("Eq") eqClassKey
562 functorClassName = clsQual pREL_BASE_Name FSLIT("Functor") functorClassKey
563 ordClassName = clsQual pREL_BASE_Name FSLIT("Ord") ordClassKey
566 monadClassName = clsQual pREL_BASE_Name FSLIT("Monad") monadClassKey
567 thenMName = varQual pREL_BASE_Name FSLIT(">>") thenMClassOpKey
568 bindMName = varQual pREL_BASE_Name FSLIT(">>=") bindMClassOpKey
569 returnMName = varQual pREL_BASE_Name FSLIT("return") returnMClassOpKey
570 failMName = varQual pREL_BASE_Name FSLIT("fail") failMClassOpKey
573 -- Random PrelBase functions
574 otherwiseIdName = varQual pREL_BASE_Name FSLIT("otherwise") otherwiseIdKey
575 foldrName = varQual pREL_BASE_Name FSLIT("foldr") foldrIdKey
576 buildName = varQual pREL_BASE_Name FSLIT("build") buildIdKey
577 augmentName = varQual pREL_BASE_Name FSLIT("augment") augmentIdKey
578 appendName = varQual pREL_BASE_Name FSLIT("++") appendIdKey
579 andName = varQual pREL_BASE_Name FSLIT("&&") andIdKey
580 orName = varQual pREL_BASE_Name FSLIT("||") orIdKey
581 assertName = varQual pREL_BASE_Name FSLIT("assert") assertIdKey
582 lazyIdName = wVarQual pREL_BASE_Name FSLIT("lazy") lazyIdKey
585 fstName = varQual pREL_TUP_Name FSLIT("fst") fstIdKey
586 sndName = varQual pREL_TUP_Name FSLIT("snd") sndIdKey
589 numClassName = clsQual pREL_NUM_Name FSLIT("Num") numClassKey
590 fromIntegerName = varQual pREL_NUM_Name FSLIT("fromInteger") fromIntegerClassOpKey
591 minusName = varQual pREL_NUM_Name FSLIT("-") minusClassOpKey
592 negateName = varQual pREL_NUM_Name FSLIT("negate") negateClassOpKey
593 plusIntegerName = varQual pREL_NUM_Name FSLIT("plusInteger") plusIntegerIdKey
594 timesIntegerName = varQual pREL_NUM_Name FSLIT("timesInteger") timesIntegerIdKey
595 integerTyConName = wTcQual pREL_NUM_Name FSLIT("Integer") integerTyConKey
596 smallIntegerDataConName = wDataQual pREL_NUM_Name FSLIT("S#") smallIntegerDataConKey
597 largeIntegerDataConName = wDataQual pREL_NUM_Name FSLIT("J#") largeIntegerDataConKey
599 -- PrelReal types and classes
600 rationalTyConName = tcQual pREL_REAL_Name FSLIT("Rational") rationalTyConKey
601 ratioTyConName = tcQual pREL_REAL_Name FSLIT("Ratio") ratioTyConKey
602 ratioDataConName = dataQual pREL_REAL_Name FSLIT(":%") ratioDataConKey
603 realClassName = clsQual pREL_REAL_Name FSLIT("Real") realClassKey
604 integralClassName = clsQual pREL_REAL_Name FSLIT("Integral") integralClassKey
605 realFracClassName = clsQual pREL_REAL_Name FSLIT("RealFrac") realFracClassKey
606 fractionalClassName = clsQual pREL_REAL_Name FSLIT("Fractional") fractionalClassKey
607 fromRationalName = varQual pREL_REAL_Name FSLIT("fromRational") fromRationalClassOpKey
610 floatTyConName = wTcQual pREL_FLOAT_Name FSLIT("Float") floatTyConKey
611 floatDataConName = wDataQual pREL_FLOAT_Name FSLIT("F#") floatDataConKey
612 doubleTyConName = wTcQual pREL_FLOAT_Name FSLIT("Double") doubleTyConKey
613 doubleDataConName = wDataQual pREL_FLOAT_Name FSLIT("D#") doubleDataConKey
614 floatingClassName = clsQual pREL_FLOAT_Name FSLIT("Floating") floatingClassKey
615 realFloatClassName = clsQual pREL_FLOAT_Name FSLIT("RealFloat") realFloatClassKey
618 ixClassName = clsQual pREL_ARR_Name FSLIT("Ix") ixClassKey
620 -- Class Typeable and Data
621 typeableClassName = clsQual dYNAMIC_Name FSLIT("Typeable") typeableClassKey
622 dataClassName = clsQual gENERICS_Name FSLIT("Data") dataClassKey
624 -- Enum module (Enum, Bounded)
625 enumClassName = clsQual pREL_ENUM_Name FSLIT("Enum") enumClassKey
626 enumFromName = varQual pREL_ENUM_Name FSLIT("enumFrom") enumFromClassOpKey
627 enumFromToName = varQual pREL_ENUM_Name FSLIT("enumFromTo") enumFromToClassOpKey
628 enumFromThenName = varQual pREL_ENUM_Name FSLIT("enumFromThen") enumFromThenClassOpKey
629 enumFromThenToName = varQual pREL_ENUM_Name FSLIT("enumFromThenTo") enumFromThenToClassOpKey
630 boundedClassName = clsQual pREL_ENUM_Name FSLIT("Bounded") boundedClassKey
633 concatName = varQual pREL_LIST_Name FSLIT("concat") concatIdKey
634 filterName = varQual pREL_LIST_Name FSLIT("filter") filterIdKey
635 zipName = varQual pREL_LIST_Name FSLIT("zip") zipIdKey
638 showClassName = clsQual pREL_SHOW_Name FSLIT("Show") showClassKey
641 readClassName = clsQual pREL_READ_Name FSLIT("Read") readClassKey
643 -- parallel array types and functions
644 enumFromToPName = varQual pREL_PARR_Name FSLIT("enumFromToP") enumFromToPIdKey
645 enumFromThenToPName= varQual pREL_PARR_Name FSLIT("enumFromThenToP") enumFromThenToPIdKey
646 parrTyConName = wTcQual pREL_PARR_Name FSLIT("[::]") parrTyConKey
647 parrDataConName = wDataQual pREL_PARR_Name FSLIT("PArr") parrDataConKey
648 nullPName = varQual pREL_PARR_Name FSLIT("nullP") nullPIdKey
649 lengthPName = varQual pREL_PARR_Name FSLIT("lengthP") lengthPIdKey
650 replicatePName = varQual pREL_PARR_Name FSLIT("replicateP") replicatePIdKey
651 mapPName = varQual pREL_PARR_Name FSLIT("mapP") mapPIdKey
652 filterPName = varQual pREL_PARR_Name FSLIT("filterP") filterPIdKey
653 zipPName = varQual pREL_PARR_Name FSLIT("zipP") zipPIdKey
654 crossPName = varQual pREL_PARR_Name FSLIT("crossP") crossPIdKey
655 indexPName = varQual pREL_PARR_Name FSLIT("!:") indexPIdKey
656 toPName = varQual pREL_PARR_Name FSLIT("toP") toPIdKey
657 bpermutePName = varQual pREL_PARR_Name FSLIT("bpermuteP") bpermutePIdKey
658 bpermuteDftPName = varQual pREL_PARR_Name FSLIT("bpermuteDftP") bpermuteDftPIdKey
659 indexOfPName = varQual pREL_PARR_Name FSLIT("indexOfP") indexOfPIdKey
662 ioTyConName = tcQual pREL_IO_BASE_Name FSLIT("IO") ioTyConKey
663 ioDataConName = dataQual pREL_IO_BASE_Name FSLIT("IO") ioDataConKey
664 thenIOName = varQual pREL_IO_BASE_Name FSLIT("thenIO") thenIOIdKey
665 bindIOName = varQual pREL_IO_BASE_Name FSLIT("bindIO") bindIOIdKey
666 returnIOName = varQual pREL_IO_BASE_Name FSLIT("returnIO") returnIOIdKey
667 failIOName = varQual pREL_IO_BASE_Name FSLIT("failIO") failIOIdKey
670 printName = varQual sYSTEM_IO_Name FSLIT("print") printIdKey
672 -- Int, Word, and Addr things
673 int8TyConName = tcQual pREL_INT_Name FSLIT("Int8") int8TyConKey
674 int16TyConName = tcQual pREL_INT_Name FSLIT("Int16") int16TyConKey
675 int32TyConName = tcQual pREL_INT_Name FSLIT("Int32") int32TyConKey
676 int64TyConName = tcQual pREL_INT_Name FSLIT("Int64") int64TyConKey
679 word8TyConName = tcQual pREL_WORD_Name FSLIT("Word8") word8TyConKey
680 word16TyConName = tcQual pREL_WORD_Name FSLIT("Word16") word16TyConKey
681 word32TyConName = tcQual pREL_WORD_Name FSLIT("Word32") word32TyConKey
682 word64TyConName = tcQual pREL_WORD_Name FSLIT("Word64") word64TyConKey
683 wordTyConName = wTcQual pREL_WORD_Name FSLIT("Word") wordTyConKey
684 wordDataConName = wDataQual pREL_WORD_Name FSLIT("W#") wordDataConKey
687 addrTyConName = tcQual aDDR_Name FSLIT("Addr") addrTyConKey
690 ptrTyConName = tcQual pREL_PTR_Name FSLIT("Ptr") ptrTyConKey
691 funPtrTyConName = tcQual pREL_PTR_Name FSLIT("FunPtr") funPtrTyConKey
694 byteArrayTyConName = tcQual pREL_BYTEARR_Name FSLIT("ByteArray") byteArrayTyConKey
695 mutableByteArrayTyConName = tcQual pREL_BYTEARR_Name FSLIT("MutableByteArray") mutableByteArrayTyConKey
697 -- Foreign objects and weak pointers
698 stablePtrTyConName = tcQual pREL_STABLE_Name FSLIT("StablePtr") stablePtrTyConKey
699 newStablePtrName = varQual pREL_STABLE_Name FSLIT("newStablePtr") newStablePtrIdKey
702 errorName = wVarQual pREL_ERR_Name FSLIT("error") errorIdKey
703 assertErrorName = wVarQual pREL_ERR_Name FSLIT("assertError") assertErrorIdKey
704 recSelErrorName = wVarQual pREL_ERR_Name FSLIT("recSelError") recSelErrorIdKey
705 runtimeErrorName = wVarQual pREL_ERR_Name FSLIT("runtimeError") runtimeErrorIdKey
706 irrefutPatErrorName = wVarQual pREL_ERR_Name FSLIT("irrefutPatError") irrefutPatErrorIdKey
707 recConErrorName = wVarQual pREL_ERR_Name FSLIT("recConError") recConErrorIdKey
708 patErrorName = wVarQual pREL_ERR_Name FSLIT("patError") patErrorIdKey
709 noMethodBindingErrorName = wVarQual pREL_ERR_Name FSLIT("noMethodBindingError") noMethodBindingErrorIdKey
710 nonExhaustiveGuardsErrorName
711 = wVarQual pREL_ERR_Name FSLIT("nonExhaustiveGuardsError") nonExhaustiveGuardsErrorIdKey
714 runSTRepName = varQual pREL_ST_Name FSLIT("runSTRep") runSTRepIdKey
716 -- The "split" Id for splittable implicit parameters
717 splitName = varQual gLA_EXTS_Name FSLIT("split") splitIdKey
719 -- Recursive-do notation
720 mfixName = varQual mONAD_FIX_Name FSLIT("mfix") mfixIdKey
723 arrAName = varQual aRROW_Name FSLIT("arr") arrAIdKey
724 composeAName = varQual aRROW_Name FSLIT(">>>") composeAIdKey
725 firstAName = varQual aRROW_Name FSLIT("first") firstAIdKey
726 appAName = varQual aRROW_Name FSLIT("app") appAIdKey
727 choiceAName = varQual aRROW_Name FSLIT("|||") choiceAIdKey
728 loopAName = varQual aRROW_Name FSLIT("loop") loopAIdKey
731 objectTyConName = wTcQual dOTNET_Name FSLIT("Object") objectTyConKey
732 unmarshalObjectName = varQual dOTNET_Name FSLIT("unmarshalObject") unmarshalObjectIdKey
733 marshalObjectName = varQual dOTNET_Name FSLIT("marshalObject") marshalObjectIdKey
734 marshalStringName = varQual dOTNET_Name FSLIT("marshalString") marshalStringIdKey
735 unmarshalStringName = varQual dOTNET_Name FSLIT("unmarshalString") unmarshalStringIdKey
736 checkDotnetResName = varQual dOTNET_Name FSLIT("checkResult") checkDotnetResNameIdKey
740 %************************************************************************
742 \subsection{Local helpers}
744 %************************************************************************
746 All these are original names; hence mkOrig
749 varQual = mk_known_key_name varName
750 dataQual = mk_known_key_name dataName -- All the constructor names here are for the DataCon
751 -- itself, which lives in the VarName name space
752 tcQual = mk_known_key_name tcName
753 clsQual = mk_known_key_name clsName
755 wVarQual = mk_wired_in_name varName -- The wired-in analogues
756 wDataQual = mk_wired_in_name dataName
757 wTcQual = mk_wired_in_name tcName
759 varQual_RDR mod str = mkOrig mod (mkOccFS varName str) -- The RDR analogues
760 dataQual_RDR mod str = mkOrig mod (mkOccFS dataName str)
761 tcQual_RDR mod str = mkOrig mod (mkOccFS tcName str)
762 clsQual_RDR mod str = mkOrig mod (mkOccFS clsName str)
764 mk_known_key_name space mod str uniq
765 = mkKnownKeyExternalName (mkBasePkgModule mod) (mkOccFS space str) uniq
766 mk_wired_in_name space mod str uniq
767 = mkWiredInName (mkBasePkgModule mod) (mkOccFS space str) uniq
769 kindQual str uq = mkInternalName uq (mkKindOccFS tcName str) noSrcLoc
770 -- Kinds are not z-encoded in interface file, hence mkKindOccFS
771 -- And they don't come from any particular module; indeed we always
772 -- want to print them unqualified. Hence the LocalName
775 %************************************************************************
777 \subsubsection[Uniques-prelude-Classes]{@Uniques@ for wired-in @Classes@}
779 %************************************************************************
780 --MetaHaskell extension hand allocate keys here
783 boundedClassKey = mkPreludeClassUnique 1
784 enumClassKey = mkPreludeClassUnique 2
785 eqClassKey = mkPreludeClassUnique 3
786 typeableClassKey = mkPreludeClassUnique 4
787 floatingClassKey = mkPreludeClassUnique 5
788 fractionalClassKey = mkPreludeClassUnique 6
789 integralClassKey = mkPreludeClassUnique 7
790 monadClassKey = mkPreludeClassUnique 8
791 dataClassKey = mkPreludeClassUnique 9
792 functorClassKey = mkPreludeClassUnique 10
793 numClassKey = mkPreludeClassUnique 11
794 ordClassKey = mkPreludeClassUnique 12
795 readClassKey = mkPreludeClassUnique 13
796 realClassKey = mkPreludeClassUnique 14
797 realFloatClassKey = mkPreludeClassUnique 15
798 realFracClassKey = mkPreludeClassUnique 16
799 showClassKey = mkPreludeClassUnique 17
800 cCallableClassKey = mkPreludeClassUnique 18
801 cReturnableClassKey = mkPreludeClassUnique 19
802 ixClassKey = mkPreludeClassUnique 20
805 %************************************************************************
807 \subsubsection[Uniques-prelude-TyCons]{@Uniques@ for wired-in @TyCons@}
809 %************************************************************************
812 addrPrimTyConKey = mkPreludeTyConUnique 1
813 addrTyConKey = mkPreludeTyConUnique 2
814 arrayPrimTyConKey = mkPreludeTyConUnique 3
815 boolTyConKey = mkPreludeTyConUnique 4
816 byteArrayPrimTyConKey = mkPreludeTyConUnique 5
817 charPrimTyConKey = mkPreludeTyConUnique 7
818 charTyConKey = mkPreludeTyConUnique 8
819 doublePrimTyConKey = mkPreludeTyConUnique 9
820 doubleTyConKey = mkPreludeTyConUnique 10
821 floatPrimTyConKey = mkPreludeTyConUnique 11
822 floatTyConKey = mkPreludeTyConUnique 12
823 funTyConKey = mkPreludeTyConUnique 13
824 intPrimTyConKey = mkPreludeTyConUnique 14
825 intTyConKey = mkPreludeTyConUnique 15
826 int8TyConKey = mkPreludeTyConUnique 16
827 int16TyConKey = mkPreludeTyConUnique 17
828 int32PrimTyConKey = mkPreludeTyConUnique 18
829 int32TyConKey = mkPreludeTyConUnique 19
830 int64PrimTyConKey = mkPreludeTyConUnique 20
831 int64TyConKey = mkPreludeTyConUnique 21
832 integerTyConKey = mkPreludeTyConUnique 22
833 listTyConKey = mkPreludeTyConUnique 23
834 foreignObjPrimTyConKey = mkPreludeTyConUnique 24
835 weakPrimTyConKey = mkPreludeTyConUnique 27
836 mutableArrayPrimTyConKey = mkPreludeTyConUnique 28
837 mutableByteArrayPrimTyConKey = mkPreludeTyConUnique 29
838 orderingTyConKey = mkPreludeTyConUnique 30
839 mVarPrimTyConKey = mkPreludeTyConUnique 31
840 ratioTyConKey = mkPreludeTyConUnique 32
841 rationalTyConKey = mkPreludeTyConUnique 33
842 realWorldTyConKey = mkPreludeTyConUnique 34
843 stablePtrPrimTyConKey = mkPreludeTyConUnique 35
844 stablePtrTyConKey = mkPreludeTyConUnique 36
845 statePrimTyConKey = mkPreludeTyConUnique 50
846 stableNamePrimTyConKey = mkPreludeTyConUnique 51
847 stableNameTyConKey = mkPreludeTyConUnique 52
848 mutableByteArrayTyConKey = mkPreludeTyConUnique 53
849 mutVarPrimTyConKey = mkPreludeTyConUnique 55
850 ioTyConKey = mkPreludeTyConUnique 56
851 byteArrayTyConKey = mkPreludeTyConUnique 57
852 wordPrimTyConKey = mkPreludeTyConUnique 58
853 wordTyConKey = mkPreludeTyConUnique 59
854 word8TyConKey = mkPreludeTyConUnique 60
855 word16TyConKey = mkPreludeTyConUnique 61
856 word32PrimTyConKey = mkPreludeTyConUnique 62
857 word32TyConKey = mkPreludeTyConUnique 63
858 word64PrimTyConKey = mkPreludeTyConUnique 64
859 word64TyConKey = mkPreludeTyConUnique 65
860 liftedConKey = mkPreludeTyConUnique 66
861 unliftedConKey = mkPreludeTyConUnique 67
862 anyBoxConKey = mkPreludeTyConUnique 68
863 kindConKey = mkPreludeTyConUnique 69
864 boxityConKey = mkPreludeTyConUnique 70
865 typeConKey = mkPreludeTyConUnique 71
866 threadIdPrimTyConKey = mkPreludeTyConUnique 72
867 bcoPrimTyConKey = mkPreludeTyConUnique 73
868 ptrTyConKey = mkPreludeTyConUnique 74
869 funPtrTyConKey = mkPreludeTyConUnique 75
871 -- Generic Type Constructors
872 crossTyConKey = mkPreludeTyConUnique 79
873 plusTyConKey = mkPreludeTyConUnique 80
874 genUnitTyConKey = mkPreludeTyConUnique 81
876 -- Parallel array type constructor
877 parrTyConKey = mkPreludeTyConUnique 82
880 objectTyConKey = mkPreludeTyConUnique 83
882 eitherTyConKey = mkPreludeTyConUnique 84
884 ---------------- Template Haskell -------------------
885 -- USES TyConUniques 100-119
886 -----------------------------------------------------
888 unitTyConKey = mkTupleTyConUnique Boxed 0
891 %************************************************************************
893 \subsubsection[Uniques-prelude-DataCons]{@Uniques@ for wired-in @DataCons@}
895 %************************************************************************
898 charDataConKey = mkPreludeDataConUnique 1
899 consDataConKey = mkPreludeDataConUnique 2
900 doubleDataConKey = mkPreludeDataConUnique 3
901 falseDataConKey = mkPreludeDataConUnique 4
902 floatDataConKey = mkPreludeDataConUnique 5
903 intDataConKey = mkPreludeDataConUnique 6
904 smallIntegerDataConKey = mkPreludeDataConUnique 7
905 largeIntegerDataConKey = mkPreludeDataConUnique 8
906 nilDataConKey = mkPreludeDataConUnique 11
907 ratioDataConKey = mkPreludeDataConUnique 12
908 stableNameDataConKey = mkPreludeDataConUnique 14
909 trueDataConKey = mkPreludeDataConUnique 15
910 wordDataConKey = mkPreludeDataConUnique 16
911 ioDataConKey = mkPreludeDataConUnique 17
913 -- Generic data constructors
914 crossDataConKey = mkPreludeDataConUnique 20
915 inlDataConKey = mkPreludeDataConUnique 21
916 inrDataConKey = mkPreludeDataConUnique 22
917 genUnitDataConKey = mkPreludeDataConUnique 23
919 -- Data constructor for parallel arrays
920 parrDataConKey = mkPreludeDataConUnique 24
922 leftDataConKey = mkPreludeDataConUnique 25
923 rightDataConKey = mkPreludeDataConUnique 26
926 %************************************************************************
928 \subsubsection[Uniques-prelude-Ids]{@Uniques@ for wired-in @Ids@ (except @DataCons@)}
930 %************************************************************************
933 absentErrorIdKey = mkPreludeMiscIdUnique 1
934 augmentIdKey = mkPreludeMiscIdUnique 3
935 appendIdKey = mkPreludeMiscIdUnique 4
936 buildIdKey = mkPreludeMiscIdUnique 5
937 errorIdKey = mkPreludeMiscIdUnique 6
938 foldlIdKey = mkPreludeMiscIdUnique 7
939 foldrIdKey = mkPreludeMiscIdUnique 8
940 recSelErrorIdKey = mkPreludeMiscIdUnique 9
941 integerMinusOneIdKey = mkPreludeMiscIdUnique 10
942 integerPlusOneIdKey = mkPreludeMiscIdUnique 11
943 integerPlusTwoIdKey = mkPreludeMiscIdUnique 12
944 integerZeroIdKey = mkPreludeMiscIdUnique 13
945 int2IntegerIdKey = mkPreludeMiscIdUnique 14
946 seqIdKey = mkPreludeMiscIdUnique 15
947 irrefutPatErrorIdKey = mkPreludeMiscIdUnique 16
948 eqStringIdKey = mkPreludeMiscIdUnique 17
949 noMethodBindingErrorIdKey = mkPreludeMiscIdUnique 18
950 nonExhaustiveGuardsErrorIdKey = mkPreludeMiscIdUnique 19
951 runtimeErrorIdKey = mkPreludeMiscIdUnique 20
952 parErrorIdKey = mkPreludeMiscIdUnique 21
953 parIdKey = mkPreludeMiscIdUnique 22
954 patErrorIdKey = mkPreludeMiscIdUnique 23
955 realWorldPrimIdKey = mkPreludeMiscIdUnique 24
956 recConErrorIdKey = mkPreludeMiscIdUnique 25
957 recUpdErrorIdKey = mkPreludeMiscIdUnique 26
958 traceIdKey = mkPreludeMiscIdUnique 27
959 unpackCStringUtf8IdKey = mkPreludeMiscIdUnique 28
960 unpackCStringAppendIdKey = mkPreludeMiscIdUnique 29
961 unpackCStringFoldrIdKey = mkPreludeMiscIdUnique 30
962 unpackCStringIdKey = mkPreludeMiscIdUnique 31
964 unsafeCoerceIdKey = mkPreludeMiscIdUnique 32
965 concatIdKey = mkPreludeMiscIdUnique 33
966 filterIdKey = mkPreludeMiscIdUnique 34
967 zipIdKey = mkPreludeMiscIdUnique 35
968 bindIOIdKey = mkPreludeMiscIdUnique 36
969 returnIOIdKey = mkPreludeMiscIdUnique 37
970 deRefStablePtrIdKey = mkPreludeMiscIdUnique 38
971 newStablePtrIdKey = mkPreludeMiscIdUnique 39
972 plusIntegerIdKey = mkPreludeMiscIdUnique 41
973 timesIntegerIdKey = mkPreludeMiscIdUnique 42
974 printIdKey = mkPreludeMiscIdUnique 43
975 failIOIdKey = mkPreludeMiscIdUnique 44
976 nullAddrIdKey = mkPreludeMiscIdUnique 46
977 voidArgIdKey = mkPreludeMiscIdUnique 47
978 splitIdKey = mkPreludeMiscIdUnique 48
979 fstIdKey = mkPreludeMiscIdUnique 49
980 sndIdKey = mkPreludeMiscIdUnique 50
981 otherwiseIdKey = mkPreludeMiscIdUnique 51
982 assertIdKey = mkPreludeMiscIdUnique 53
983 runSTRepIdKey = mkPreludeMiscIdUnique 54
985 rootMainKey = mkPreludeMiscIdUnique 55
986 runMainKey = mkPreludeMiscIdUnique 56
988 andIdKey = mkPreludeMiscIdUnique 57
989 orIdKey = mkPreludeMiscIdUnique 58
990 thenIOIdKey = mkPreludeMiscIdUnique 59
991 lazyIdKey = mkPreludeMiscIdUnique 60
992 assertErrorIdKey = mkPreludeMiscIdUnique 61
994 -- Parallel array functions
995 nullPIdKey = mkPreludeMiscIdUnique 80
996 lengthPIdKey = mkPreludeMiscIdUnique 81
997 replicatePIdKey = mkPreludeMiscIdUnique 82
998 mapPIdKey = mkPreludeMiscIdUnique 83
999 filterPIdKey = mkPreludeMiscIdUnique 84
1000 zipPIdKey = mkPreludeMiscIdUnique 85
1001 crossPIdKey = mkPreludeMiscIdUnique 86
1002 indexPIdKey = mkPreludeMiscIdUnique 87
1003 toPIdKey = mkPreludeMiscIdUnique 88
1004 enumFromToPIdKey = mkPreludeMiscIdUnique 89
1005 enumFromThenToPIdKey = mkPreludeMiscIdUnique 90
1006 bpermutePIdKey = mkPreludeMiscIdUnique 91
1007 bpermuteDftPIdKey = mkPreludeMiscIdUnique 92
1008 indexOfPIdKey = mkPreludeMiscIdUnique 93
1011 unmarshalObjectIdKey = mkPreludeMiscIdUnique 94
1012 marshalObjectIdKey = mkPreludeMiscIdUnique 95
1013 marshalStringIdKey = mkPreludeMiscIdUnique 96
1014 unmarshalStringIdKey = mkPreludeMiscIdUnique 97
1015 checkDotnetResNameIdKey = mkPreludeMiscIdUnique 98
1019 Certain class operations from Prelude classes. They get their own
1020 uniques so we can look them up easily when we want to conjure them up
1021 during type checking.
1024 -- Just a place holder for unbound variables produced by the renamer:
1025 unboundKey = mkPreludeMiscIdUnique 101
1027 fromIntegerClassOpKey = mkPreludeMiscIdUnique 102
1028 minusClassOpKey = mkPreludeMiscIdUnique 103
1029 fromRationalClassOpKey = mkPreludeMiscIdUnique 104
1030 enumFromClassOpKey = mkPreludeMiscIdUnique 105
1031 enumFromThenClassOpKey = mkPreludeMiscIdUnique 106
1032 enumFromToClassOpKey = mkPreludeMiscIdUnique 107
1033 enumFromThenToClassOpKey = mkPreludeMiscIdUnique 108
1034 eqClassOpKey = mkPreludeMiscIdUnique 109
1035 geClassOpKey = mkPreludeMiscIdUnique 110
1036 negateClassOpKey = mkPreludeMiscIdUnique 111
1037 failMClassOpKey = mkPreludeMiscIdUnique 112
1038 bindMClassOpKey = mkPreludeMiscIdUnique 113 -- (>>=)
1039 thenMClassOpKey = mkPreludeMiscIdUnique 114 -- (>>)
1040 returnMClassOpKey = mkPreludeMiscIdUnique 117
1042 -- Recursive do notation
1043 mfixIdKey = mkPreludeMiscIdUnique 118
1046 arrAIdKey = mkPreludeMiscIdUnique 119
1047 composeAIdKey = mkPreludeMiscIdUnique 120 -- >>>
1048 firstAIdKey = mkPreludeMiscIdUnique 121
1049 appAIdKey = mkPreludeMiscIdUnique 122
1050 choiceAIdKey = mkPreludeMiscIdUnique 123 -- |||
1051 loopAIdKey = mkPreludeMiscIdUnique 124
1053 ---------------- Template Haskell -------------------
1054 -- USES IdUniques 200-299
1055 -----------------------------------------------------
1059 %************************************************************************
1061 \subsection{Standard groups of types}
1063 %************************************************************************
1075 -- Renamer always imports these data decls replete with constructors
1076 -- so that desugarer can always see their constructors. Ugh!
1081 , mutableByteArrayTyConKey
1095 %************************************************************************
1097 \subsection[Class-std-groups]{Standard groups of Prelude classes}
1099 %************************************************************************
1101 NOTE: @Eq@ and @Text@ do need to appear in @standardClasses@
1102 even though every numeric class has these two as a superclass,
1103 because the list of ambiguous dictionaries hasn't been simplified.
1111 ++ fractionalClassKeys
1113 fractionalClassKeys =
1114 [ fractionalClassKey
1120 -- the strictness analyser needs to know about numeric types
1121 -- (see SaAbsInt.lhs)
1122 needsDataDeclCtxtClassKeys = -- see comments in TcDeriv
1128 , cReturnableClassKey
1132 = derivableClassKeys ++ numericClassKeys ++ cCallishClassKeys
1134 -- We have to have "CCallable" and "CReturnable" in the standard
1135 -- classes, so that if you go...
1137 -- _ccall_ foo ... 93{-numeric literal-} ...
1139 -- ... it can do The Right Thing on the 93.
1141 noDictClassKeys -- These classes are used only for type annotations;
1142 -- they are not implemented by dictionaries, ever.
1146 @derivableClassKeys@ is also used in checking \tr{deriving} constructs
1151 = [ eqClassKey, ordClassKey, enumClassKey, ixClassKey,
1152 boundedClassKey, showClassKey, readClassKey ]