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 -- The above warning supression flag is a temporary kludge.
41 -- While working on this module you are encouraged to remove it and fix
42 -- any warnings in the module. See
43 -- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
47 Unique, Uniquable(..), hasKey, -- Re-exported for convenience
49 -----------------------------------------------------------
50 module PrelNames, -- A huge bunch of (a) Names, e.g. intTyConName
51 -- (b) Uniques e.g. intTyConKey
52 -- (c) Groups of classes and types
53 -- (d) miscellaneous things
54 -- So many that we export them all
57 #include "HsVersions.h"
60 import OccName ( dataName, tcName, clsName, varName, tvName,
61 mkOccNameFS, mkVarOccFS )
62 import RdrName ( RdrName, nameRdrName, mkOrig, rdrNameOcc, mkUnqual )
63 import Unique ( Unique, Uniquable(..), hasKey,
64 mkPreludeMiscIdUnique, mkPreludeDataConUnique,
65 mkPreludeTyConUnique, mkPreludeClassUnique,
68 import BasicTypes ( Boxity(..), Arity )
69 import Name ( Name, mkInternalName, mkExternalName )
75 %************************************************************************
77 \subsection{Local Names}
79 %************************************************************************
81 This *local* name is used by the interactive stuff
84 itName uniq = mkInternalName uniq (mkOccNameFS varName FSLIT("it")) noSrcSpan
88 -- mkUnboundName makes a place-holder Name; it shouldn't be looked at except possibly
89 -- during compiler debugging.
90 mkUnboundName :: RdrName -> Name
91 mkUnboundName rdr_name = mkInternalName unboundKey (rdrNameOcc rdr_name) noSrcSpan
93 isUnboundName :: Name -> Bool
94 isUnboundName name = name `hasKey` unboundKey
98 %************************************************************************
100 \subsection{Known key Names}
102 %************************************************************************
104 This section tells what the compiler knows about the assocation of
105 names with uniques. These ones are the *non* wired-in ones. The
106 wired in ones are defined in TysWiredIn etc.
109 basicKnownKeyNames :: [Name]
112 ++ typeableClassNames
113 ++ [ -- Type constructors (synonyms especially)
114 ioTyConName, ioDataConName,
121 integerTyConName, smallIntegerDataConName, largeIntegerDataConName,
123 -- Classes. *Must* include:
124 -- classes that are grabbed by key (e.g., eqClassKey)
125 -- classes in "Class.standardClassKeys" (quite a few)
126 eqClassName, -- mentioned, derivable
127 ordClassName, -- derivable
128 boundedClassName, -- derivable
129 numClassName, -- mentioned, numeric
130 enumClassName, -- derivable
133 realClassName, -- numeric
134 integralClassName, -- numeric
135 fractionalClassName, -- numeric
136 floatingClassName, -- numeric
137 realFracClassName, -- numeric
138 realFloatClassName, -- numeric
143 negateName, minusName,
144 fromRationalName, fromIntegerName,
151 enumFromName, enumFromThenName,
152 enumFromThenToName, enumFromToName,
153 enumFromToPName, enumFromThenToPName,
156 thenIOName, bindIOName, returnIOName, failIOName,
157 failMName, bindMName, thenMName, returnMName,
163 arrAName, composeAName, firstAName,
164 appAName, choiceAName, loopAName,
182 unpackCStringName, unpackCStringAppendName,
183 unpackCStringFoldrName, unpackCStringUtf8Name,
186 concatName, filterName, mapName,
187 zipName, foldrName, buildName, augmentName, appendName,
189 -- Parallel array operations
190 nullPName, lengthPName, replicatePName, singletonPName, mapPName,
191 filterPName, zipPName, crossMapPName, indexPName,
192 toPName, bpermutePName, bpermuteDftPName, indexOfPName,
194 -- FFI primitive types that are not wired-in.
195 stablePtrTyConName, ptrTyConName, funPtrTyConName,
196 int8TyConName, int16TyConName, int32TyConName, int64TyConName,
197 wordTyConName, word8TyConName, word16TyConName, word32TyConName, word64TyConName,
200 otherwiseIdName, inlineIdName,
201 plusIntegerName, timesIntegerName,
202 eqStringName, assertName, breakpointName, breakpointCondName,
203 breakpointAutoName, opaqueTyConName,
204 assertErrorName, runSTRepName,
205 printName, fstName, sndName,
208 monadFixClassName, mfixName,
211 randomClassName, randomGenClassName, monadPlusClassName,
217 , eitherTyConName, leftDataConName, rightDataConName
220 , objectTyConName, marshalObjectName, unmarshalObjectName
221 , marshalStringName, unmarshalStringName, checkDotnetResName
224 genericTyConNames :: [Name]
225 genericTyConNames = [crossTyConName, plusTyConName, genUnitTyConName]
229 %************************************************************************
231 \subsection{Module names}
233 %************************************************************************
236 --MetaHaskell Extension Add a new module here
238 pRELUDE = mkBaseModule_ pRELUDE_NAME
239 gHC_PRIM = mkBaseModule FSLIT("GHC.Prim") -- Primitive types and values
240 gHC_BASE = mkBaseModule FSLIT("GHC.Base")
241 gHC_ENUM = mkBaseModule FSLIT("GHC.Enum")
242 gHC_SHOW = mkBaseModule FSLIT("GHC.Show")
243 gHC_READ = mkBaseModule FSLIT("GHC.Read")
244 gHC_NUM = mkBaseModule FSLIT("GHC.Num")
245 gHC_LIST = mkBaseModule FSLIT("GHC.List")
246 gHC_PARR = mkBaseModule FSLIT("GHC.PArr")
247 dATA_TUP = mkBaseModule FSLIT("Data.Tuple")
248 dATA_EITHER = mkBaseModule FSLIT("Data.Either")
249 dATA_STRING = mkBaseModule FSLIT("Data.String")
250 gHC_PACK = mkBaseModule FSLIT("GHC.Pack")
251 gHC_CONC = mkBaseModule FSLIT("GHC.Conc")
252 gHC_IO_BASE = mkBaseModule FSLIT("GHC.IOBase")
253 gHC_ST = mkBaseModule FSLIT("GHC.ST")
254 gHC_ARR = mkBaseModule FSLIT("GHC.Arr")
255 gHC_STABLE = mkBaseModule FSLIT("GHC.Stable")
256 gHC_ADDR = mkBaseModule FSLIT("GHC.Addr")
257 gHC_PTR = mkBaseModule FSLIT("GHC.Ptr")
258 gHC_ERR = mkBaseModule FSLIT("GHC.Err")
259 gHC_REAL = mkBaseModule FSLIT("GHC.Real")
260 gHC_FLOAT = mkBaseModule FSLIT("GHC.Float")
261 gHC_TOP_HANDLER = mkBaseModule FSLIT("GHC.TopHandler")
262 sYSTEM_IO = mkBaseModule FSLIT("System.IO")
263 dYNAMIC = mkBaseModule FSLIT("Data.Dynamic")
264 tYPEABLE = mkBaseModule FSLIT("Data.Typeable")
265 gENERICS = mkBaseModule FSLIT("Data.Generics.Basics")
266 dOTNET = mkBaseModule FSLIT("GHC.Dotnet")
267 rEAD_PREC = mkBaseModule FSLIT("Text.ParserCombinators.ReadPrec")
268 lEX = mkBaseModule FSLIT("Text.Read.Lex")
269 gHC_INT = mkBaseModule FSLIT("GHC.Int")
270 gHC_WORD = mkBaseModule FSLIT("GHC.Word")
271 mONAD = mkBaseModule FSLIT("Control.Monad")
272 mONAD_FIX = mkBaseModule FSLIT("Control.Monad.Fix")
273 aRROW = mkBaseModule FSLIT("Control.Arrow")
274 gHC_DESUGAR = mkBaseModule FSLIT("GHC.Desugar")
275 rANDOM = mkBaseModule FSLIT("System.Random")
276 gHC_EXTS = mkBaseModule FSLIT("GHC.Exts")
278 mAIN = mkMainModule_ mAIN_NAME
279 rOOT_MAIN = mkMainModule FSLIT(":Main") -- Root module for initialisation
281 -- The ':xxx' makes a module name that the user can never
282 -- use himself. The z-encoding for ':' is "ZC", so the z-encoded
283 -- module name still starts with a capital letter, which keeps
284 -- the z-encoded version consistent.
285 iNTERACTIVE = mkMainModule FSLIT(":Interactive")
286 thFAKE = mkMainModule FSLIT(":THFake")
288 pRELUDE_NAME = mkModuleNameFS FSLIT("Prelude")
289 mAIN_NAME = mkModuleNameFS FSLIT("Main")
291 mkBaseModule :: FastString -> Module
292 mkBaseModule m = mkModule basePackageId (mkModuleNameFS m)
294 mkBaseModule_ :: ModuleName -> Module
295 mkBaseModule_ m = mkModule basePackageId m
297 mkMainModule :: FastString -> Module
298 mkMainModule m = mkModule mainPackageId (mkModuleNameFS m)
300 mkMainModule_ :: ModuleName -> Module
301 mkMainModule_ m = mkModule mainPackageId m
304 %************************************************************************
306 \subsection{Constructing the names of tuples
308 %************************************************************************
311 mkTupleModule :: Boxity -> Arity -> Module
312 mkTupleModule Boxed 0 = gHC_BASE
313 mkTupleModule Boxed _ = dATA_TUP
314 mkTupleModule Unboxed _ = gHC_PRIM
318 %************************************************************************
322 %************************************************************************
325 main_RDR_Unqual = mkUnqual varName FSLIT("main")
326 -- We definitely don't want an Orig RdrName, because
327 -- main might, in principle, be imported into module Main
329 forall_tv_RDR, dot_tv_RDR :: RdrName
330 forall_tv_RDR = mkUnqual tvName FSLIT("forall")
331 dot_tv_RDR = mkUnqual tvName FSLIT(".")
333 eq_RDR = nameRdrName eqName
334 ge_RDR = nameRdrName geName
335 ne_RDR = varQual_RDR gHC_BASE FSLIT("/=")
336 le_RDR = varQual_RDR gHC_BASE FSLIT("<=")
337 lt_RDR = varQual_RDR gHC_BASE FSLIT("<")
338 gt_RDR = varQual_RDR gHC_BASE FSLIT(">")
339 compare_RDR = varQual_RDR gHC_BASE FSLIT("compare")
340 ltTag_RDR = dataQual_RDR gHC_BASE FSLIT("LT")
341 eqTag_RDR = dataQual_RDR gHC_BASE FSLIT("EQ")
342 gtTag_RDR = dataQual_RDR gHC_BASE FSLIT("GT")
344 eqClass_RDR = nameRdrName eqClassName
345 numClass_RDR = nameRdrName numClassName
346 ordClass_RDR = nameRdrName ordClassName
347 enumClass_RDR = nameRdrName enumClassName
348 monadClass_RDR = nameRdrName monadClassName
350 map_RDR = varQual_RDR gHC_BASE FSLIT("map")
351 append_RDR = varQual_RDR gHC_BASE FSLIT("++")
353 foldr_RDR = nameRdrName foldrName
354 build_RDR = nameRdrName buildName
355 returnM_RDR = nameRdrName returnMName
356 bindM_RDR = nameRdrName bindMName
357 failM_RDR = nameRdrName failMName
359 and_RDR = nameRdrName andName
361 left_RDR = nameRdrName leftDataConName
362 right_RDR = nameRdrName rightDataConName
364 fromEnum_RDR = varQual_RDR gHC_ENUM FSLIT("fromEnum")
365 toEnum_RDR = varQual_RDR gHC_ENUM FSLIT("toEnum")
367 enumFrom_RDR = nameRdrName enumFromName
368 enumFromTo_RDR = nameRdrName enumFromToName
369 enumFromThen_RDR = nameRdrName enumFromThenName
370 enumFromThenTo_RDR = nameRdrName enumFromThenToName
372 ratioDataCon_RDR = nameRdrName ratioDataConName
373 plusInteger_RDR = nameRdrName plusIntegerName
374 timesInteger_RDR = nameRdrName timesIntegerName
376 ioDataCon_RDR = nameRdrName ioDataConName
378 eqString_RDR = nameRdrName eqStringName
379 unpackCString_RDR = nameRdrName unpackCStringName
380 unpackCStringFoldr_RDR = nameRdrName unpackCStringFoldrName
381 unpackCStringUtf8_RDR = nameRdrName unpackCStringUtf8Name
383 newStablePtr_RDR = nameRdrName newStablePtrName
384 wordDataCon_RDR = dataQual_RDR gHC_WORD FSLIT("W#")
386 bindIO_RDR = nameRdrName bindIOName
387 returnIO_RDR = nameRdrName returnIOName
389 fromInteger_RDR = nameRdrName fromIntegerName
390 fromRational_RDR = nameRdrName fromRationalName
391 minus_RDR = nameRdrName minusName
392 times_RDR = varQual_RDR gHC_NUM FSLIT("*")
393 plus_RDR = varQual_RDR gHC_NUM FSLIT("+")
395 fromString_RDR = nameRdrName fromStringName
397 compose_RDR = varQual_RDR gHC_BASE FSLIT(".")
399 not_RDR = varQual_RDR gHC_BASE FSLIT("not")
400 getTag_RDR = varQual_RDR gHC_BASE FSLIT("getTag")
401 succ_RDR = varQual_RDR gHC_ENUM FSLIT("succ")
402 pred_RDR = varQual_RDR gHC_ENUM FSLIT("pred")
403 minBound_RDR = varQual_RDR gHC_ENUM FSLIT("minBound")
404 maxBound_RDR = varQual_RDR gHC_ENUM FSLIT("maxBound")
405 range_RDR = varQual_RDR gHC_ARR FSLIT("range")
406 inRange_RDR = varQual_RDR gHC_ARR FSLIT("inRange")
407 index_RDR = varQual_RDR gHC_ARR FSLIT("index")
408 unsafeIndex_RDR = varQual_RDR gHC_ARR FSLIT("unsafeIndex")
409 unsafeRangeSize_RDR = varQual_RDR gHC_ARR FSLIT("unsafeRangeSize")
411 readList_RDR = varQual_RDR gHC_READ FSLIT("readList")
412 readListDefault_RDR = varQual_RDR gHC_READ FSLIT("readListDefault")
413 readListPrec_RDR = varQual_RDR gHC_READ FSLIT("readListPrec")
414 readListPrecDefault_RDR = varQual_RDR gHC_READ FSLIT("readListPrecDefault")
415 readPrec_RDR = varQual_RDR gHC_READ FSLIT("readPrec")
416 parens_RDR = varQual_RDR gHC_READ FSLIT("parens")
417 choose_RDR = varQual_RDR gHC_READ FSLIT("choose")
418 lexP_RDR = varQual_RDR gHC_READ FSLIT("lexP")
420 punc_RDR = dataQual_RDR lEX FSLIT("Punc")
421 ident_RDR = dataQual_RDR lEX FSLIT("Ident")
422 symbol_RDR = dataQual_RDR lEX FSLIT("Symbol")
424 step_RDR = varQual_RDR rEAD_PREC FSLIT("step")
425 alt_RDR = varQual_RDR rEAD_PREC FSLIT("+++")
426 reset_RDR = varQual_RDR rEAD_PREC FSLIT("reset")
427 prec_RDR = varQual_RDR rEAD_PREC FSLIT("prec")
429 showList_RDR = varQual_RDR gHC_SHOW FSLIT("showList")
430 showList___RDR = varQual_RDR gHC_SHOW FSLIT("showList__")
431 showsPrec_RDR = varQual_RDR gHC_SHOW FSLIT("showsPrec")
432 showString_RDR = varQual_RDR gHC_SHOW FSLIT("showString")
433 showSpace_RDR = varQual_RDR gHC_SHOW FSLIT("showSpace")
434 showParen_RDR = varQual_RDR gHC_SHOW FSLIT("showParen")
436 typeOf_RDR = varQual_RDR tYPEABLE FSLIT("typeOf")
437 mkTypeRep_RDR = varQual_RDR tYPEABLE FSLIT("mkTyConApp")
438 mkTyConRep_RDR = varQual_RDR tYPEABLE FSLIT("mkTyCon")
440 undefined_RDR = varQual_RDR gHC_ERR FSLIT("undefined")
442 crossDataCon_RDR = dataQual_RDR gHC_BASE FSLIT(":*:")
443 inlDataCon_RDR = dataQual_RDR gHC_BASE FSLIT("Inl")
444 inrDataCon_RDR = dataQual_RDR gHC_BASE FSLIT("Inr")
445 genUnitDataCon_RDR = dataQual_RDR gHC_BASE FSLIT("Unit")
447 ----------------------
448 varQual_RDR mod str = mkOrig mod (mkOccNameFS varName str)
449 tcQual_RDR mod str = mkOrig mod (mkOccNameFS tcName str)
450 clsQual_RDR mod str = mkOrig mod (mkOccNameFS clsName str)
451 dataQual_RDR mod str = mkOrig mod (mkOccNameFS dataName str)
454 %************************************************************************
456 \subsection{Known-key names}
458 %************************************************************************
460 Many of these Names are not really "built in", but some parts of the
461 compiler (notably the deriving mechanism) need to mention their names,
462 and it's convenient to write them all down in one place.
464 --MetaHaskell Extension add the constrs and the lower case case
465 -- guys as well (perhaps) e.g. see trueDataConName below
469 runMainIOName = varQual gHC_TOP_HANDLER FSLIT("runMainIO") runMainKey
471 orderingTyConName = tcQual gHC_BASE FSLIT("Ordering") orderingTyConKey
473 eitherTyConName = tcQual dATA_EITHER FSLIT("Either") eitherTyConKey
474 leftDataConName = conName dATA_EITHER FSLIT("Left") leftDataConKey
475 rightDataConName = conName dATA_EITHER FSLIT("Right") rightDataConKey
478 crossTyConName = tcQual gHC_BASE FSLIT(":*:") crossTyConKey
479 plusTyConName = tcQual gHC_BASE FSLIT(":+:") plusTyConKey
480 genUnitTyConName = tcQual gHC_BASE FSLIT("Unit") genUnitTyConKey
482 -- Base strings Strings
483 unpackCStringName = varQual gHC_BASE FSLIT("unpackCString#") unpackCStringIdKey
484 unpackCStringAppendName = varQual gHC_BASE FSLIT("unpackAppendCString#") unpackCStringAppendIdKey
485 unpackCStringFoldrName = varQual gHC_BASE FSLIT("unpackFoldrCString#") unpackCStringFoldrIdKey
486 unpackCStringUtf8Name = varQual gHC_BASE FSLIT("unpackCStringUtf8#") unpackCStringUtf8IdKey
487 eqStringName = varQual gHC_BASE FSLIT("eqString") eqStringIdKey
488 stringTyConName = tcQual gHC_BASE FSLIT("String") stringTyConKey
490 -- The 'inline' function
491 inlineIdName = varQual gHC_BASE FSLIT("inline") inlineIdKey
493 -- Base classes (Eq, Ord, Functor)
494 eqClassName = clsQual gHC_BASE FSLIT("Eq") eqClassKey
495 eqName = methName gHC_BASE FSLIT("==") eqClassOpKey
496 ordClassName = clsQual gHC_BASE FSLIT("Ord") ordClassKey
497 geName = methName gHC_BASE FSLIT(">=") geClassOpKey
498 functorClassName = clsQual gHC_BASE FSLIT("Functor") functorClassKey
501 monadClassName = clsQual gHC_BASE FSLIT("Monad") monadClassKey
502 thenMName = methName gHC_BASE FSLIT(">>") thenMClassOpKey
503 bindMName = methName gHC_BASE FSLIT(">>=") bindMClassOpKey
504 returnMName = methName gHC_BASE FSLIT("return") returnMClassOpKey
505 failMName = methName gHC_BASE FSLIT("fail") failMClassOpKey
507 -- Functions for GHC extensions
508 groupWithName = varQual gHC_EXTS FSLIT("groupWith") groupWithIdKey
510 -- Random PrelBase functions
511 fromStringName = methName dATA_STRING FSLIT("fromString") fromStringClassOpKey
512 otherwiseIdName = varQual gHC_BASE FSLIT("otherwise") otherwiseIdKey
513 foldrName = varQual gHC_BASE FSLIT("foldr") foldrIdKey
514 buildName = varQual gHC_BASE FSLIT("build") buildIdKey
515 augmentName = varQual gHC_BASE FSLIT("augment") augmentIdKey
516 mapName = varQual gHC_BASE FSLIT("map") mapIdKey
517 appendName = varQual gHC_BASE FSLIT("++") appendIdKey
518 andName = varQual gHC_BASE FSLIT("&&") andIdKey
519 orName = varQual gHC_BASE FSLIT("||") orIdKey
520 assertName = varQual gHC_BASE FSLIT("assert") assertIdKey
521 breakpointName = varQual gHC_BASE FSLIT("breakpoint") breakpointIdKey
522 breakpointCondName= varQual gHC_BASE FSLIT("breakpointCond") breakpointCondIdKey
523 breakpointAutoName= varQual gHC_BASE FSLIT("breakpointAuto") breakpointAutoIdKey
524 opaqueTyConName = tcQual gHC_BASE FSLIT("Opaque") opaqueTyConKey
529 (mkOccNameFS varName FSLIT("breakpointJump"))
531 breakpointCondJumpName
533 breakpointCondJumpIdKey
534 (mkOccNameFS varName FSLIT("breakpointCondJump"))
536 breakpointAutoJumpName
538 breakpointAutoJumpIdKey
539 (mkOccNameFS varName FSLIT("breakpointAutoJump"))
543 fstName = varQual dATA_TUP FSLIT("fst") fstIdKey
544 sndName = varQual dATA_TUP FSLIT("snd") sndIdKey
547 numClassName = clsQual gHC_NUM FSLIT("Num") numClassKey
548 fromIntegerName = methName gHC_NUM FSLIT("fromInteger") fromIntegerClassOpKey
549 minusName = methName gHC_NUM FSLIT("-") minusClassOpKey
550 negateName = methName gHC_NUM FSLIT("negate") negateClassOpKey
551 plusIntegerName = varQual gHC_NUM FSLIT("plusInteger") plusIntegerIdKey
552 timesIntegerName = varQual gHC_NUM FSLIT("timesInteger") timesIntegerIdKey
553 integerTyConName = tcQual gHC_NUM FSLIT("Integer") integerTyConKey
554 smallIntegerDataConName = conName gHC_NUM FSLIT("S#") smallIntegerDataConKey
555 largeIntegerDataConName = conName gHC_NUM FSLIT("J#") largeIntegerDataConKey
557 -- PrelReal types and classes
558 rationalTyConName = tcQual gHC_REAL FSLIT("Rational") rationalTyConKey
559 ratioTyConName = tcQual gHC_REAL FSLIT("Ratio") ratioTyConKey
560 ratioDataConName = conName gHC_REAL FSLIT(":%") ratioDataConKey
561 realClassName = clsQual gHC_REAL FSLIT("Real") realClassKey
562 integralClassName = clsQual gHC_REAL FSLIT("Integral") integralClassKey
563 realFracClassName = clsQual gHC_REAL FSLIT("RealFrac") realFracClassKey
564 fractionalClassName = clsQual gHC_REAL FSLIT("Fractional") fractionalClassKey
565 fromRationalName = methName gHC_REAL FSLIT("fromRational") fromRationalClassOpKey
568 floatingClassName = clsQual gHC_FLOAT FSLIT("Floating") floatingClassKey
569 realFloatClassName = clsQual gHC_FLOAT FSLIT("RealFloat") realFloatClassKey
572 ixClassName = clsQual gHC_ARR FSLIT("Ix") ixClassKey
575 typeableClassName = clsQual tYPEABLE FSLIT("Typeable") typeableClassKey
576 typeable1ClassName = clsQual tYPEABLE FSLIT("Typeable1") typeable1ClassKey
577 typeable2ClassName = clsQual tYPEABLE FSLIT("Typeable2") typeable2ClassKey
578 typeable3ClassName = clsQual tYPEABLE FSLIT("Typeable3") typeable3ClassKey
579 typeable4ClassName = clsQual tYPEABLE FSLIT("Typeable4") typeable4ClassKey
580 typeable5ClassName = clsQual tYPEABLE FSLIT("Typeable5") typeable5ClassKey
581 typeable6ClassName = clsQual tYPEABLE FSLIT("Typeable6") typeable6ClassKey
582 typeable7ClassName = clsQual tYPEABLE FSLIT("Typeable7") typeable7ClassKey
584 typeableClassNames = [ typeableClassName, typeable1ClassName, typeable2ClassName
585 , typeable3ClassName, typeable4ClassName, typeable5ClassName
586 , typeable6ClassName, typeable7ClassName ]
589 dataClassName = clsQual gENERICS FSLIT("Data") dataClassKey
592 assertErrorName = varQual gHC_ERR FSLIT("assertError") assertErrorIdKey
594 -- Enum module (Enum, Bounded)
595 enumClassName = clsQual gHC_ENUM FSLIT("Enum") enumClassKey
596 enumFromName = methName gHC_ENUM FSLIT("enumFrom") enumFromClassOpKey
597 enumFromToName = methName gHC_ENUM FSLIT("enumFromTo") enumFromToClassOpKey
598 enumFromThenName = methName gHC_ENUM FSLIT("enumFromThen") enumFromThenClassOpKey
599 enumFromThenToName = methName gHC_ENUM FSLIT("enumFromThenTo") enumFromThenToClassOpKey
600 boundedClassName = clsQual gHC_ENUM FSLIT("Bounded") boundedClassKey
603 concatName = varQual gHC_LIST FSLIT("concat") concatIdKey
604 filterName = varQual gHC_LIST FSLIT("filter") filterIdKey
605 zipName = varQual gHC_LIST FSLIT("zip") zipIdKey
608 showClassName = clsQual gHC_SHOW FSLIT("Show") showClassKey
611 readClassName = clsQual gHC_READ FSLIT("Read") readClassKey
613 -- parallel array types and functions
614 enumFromToPName = varQual gHC_PARR FSLIT("enumFromToP") enumFromToPIdKey
615 enumFromThenToPName= varQual gHC_PARR FSLIT("enumFromThenToP") enumFromThenToPIdKey
616 nullPName = varQual gHC_PARR FSLIT("nullP") nullPIdKey
617 lengthPName = varQual gHC_PARR FSLIT("lengthP") lengthPIdKey
618 singletonPName = varQual gHC_PARR FSLIT("singletonP") singletonPIdKey
619 replicatePName = varQual gHC_PARR FSLIT("replicateP") replicatePIdKey
620 mapPName = varQual gHC_PARR FSLIT("mapP") mapPIdKey
621 filterPName = varQual gHC_PARR FSLIT("filterP") filterPIdKey
622 zipPName = varQual gHC_PARR FSLIT("zipP") zipPIdKey
623 crossMapPName = varQual gHC_PARR FSLIT("crossMapP") crossMapPIdKey
624 indexPName = varQual gHC_PARR FSLIT("!:") indexPIdKey
625 toPName = varQual gHC_PARR FSLIT("toP") toPIdKey
626 bpermutePName = varQual gHC_PARR FSLIT("bpermuteP") bpermutePIdKey
627 bpermuteDftPName = varQual gHC_PARR FSLIT("bpermuteDftP") bpermuteDftPIdKey
628 indexOfPName = varQual gHC_PARR FSLIT("indexOfP") indexOfPIdKey
631 ioTyConName = tcQual gHC_IO_BASE FSLIT("IO") ioTyConKey
632 ioDataConName = conName gHC_IO_BASE FSLIT("IO") ioDataConKey
633 thenIOName = varQual gHC_IO_BASE FSLIT("thenIO") thenIOIdKey
634 bindIOName = varQual gHC_IO_BASE FSLIT("bindIO") bindIOIdKey
635 returnIOName = varQual gHC_IO_BASE FSLIT("returnIO") returnIOIdKey
636 failIOName = varQual gHC_IO_BASE FSLIT("failIO") failIOIdKey
639 printName = varQual sYSTEM_IO FSLIT("print") printIdKey
641 -- Int, Word, and Addr things
642 int8TyConName = tcQual gHC_INT FSLIT("Int8") int8TyConKey
643 int16TyConName = tcQual gHC_INT FSLIT("Int16") int16TyConKey
644 int32TyConName = tcQual gHC_INT FSLIT("Int32") int32TyConKey
645 int64TyConName = tcQual gHC_INT FSLIT("Int64") int64TyConKey
648 word8TyConName = tcQual gHC_WORD FSLIT("Word8") word8TyConKey
649 word16TyConName = tcQual gHC_WORD FSLIT("Word16") word16TyConKey
650 word32TyConName = tcQual gHC_WORD FSLIT("Word32") word32TyConKey
651 word64TyConName = tcQual gHC_WORD FSLIT("Word64") word64TyConKey
652 wordTyConName = tcQual gHC_WORD FSLIT("Word") wordTyConKey
653 wordDataConName = conName gHC_WORD FSLIT("W#") wordDataConKey
656 ptrTyConName = tcQual gHC_PTR FSLIT("Ptr") ptrTyConKey
657 funPtrTyConName = tcQual gHC_PTR FSLIT("FunPtr") funPtrTyConKey
659 -- Foreign objects and weak pointers
660 stablePtrTyConName = tcQual gHC_STABLE FSLIT("StablePtr") stablePtrTyConKey
661 newStablePtrName = varQual gHC_STABLE FSLIT("newStablePtr") newStablePtrIdKey
664 runSTRepName = varQual gHC_ST FSLIT("runSTRep") runSTRepIdKey
666 -- Recursive-do notation
667 monadFixClassName = clsQual mONAD_FIX FSLIT("MonadFix") monadFixClassKey
668 mfixName = methName mONAD_FIX FSLIT("mfix") mfixIdKey
671 arrAName = varQual aRROW FSLIT("arr") arrAIdKey
672 composeAName = varQual gHC_DESUGAR FSLIT(">>>") composeAIdKey
673 firstAName = varQual aRROW FSLIT("first") firstAIdKey
674 appAName = varQual aRROW FSLIT("app") appAIdKey
675 choiceAName = varQual aRROW FSLIT("|||") choiceAIdKey
676 loopAName = varQual aRROW FSLIT("loop") loopAIdKey
678 -- Other classes, needed for type defaulting
679 monadPlusClassName = clsQual mONAD FSLIT("MonadPlus") monadPlusClassKey
680 randomClassName = clsQual rANDOM FSLIT("Random") randomClassKey
681 randomGenClassName = clsQual rANDOM FSLIT("RandomGen") randomGenClassKey
682 isStringClassName = clsQual dATA_STRING FSLIT("IsString") isStringClassKey
685 objectTyConName = tcQual dOTNET FSLIT("Object") objectTyConKey
686 -- objectTyConName was "wTcQual", but that's gone now, and
687 -- I can't see why it was wired in anyway...
688 unmarshalObjectName = varQual dOTNET FSLIT("unmarshalObject") unmarshalObjectIdKey
689 marshalObjectName = varQual dOTNET FSLIT("marshalObject") marshalObjectIdKey
690 marshalStringName = varQual dOTNET FSLIT("marshalString") marshalStringIdKey
691 unmarshalStringName = varQual dOTNET FSLIT("unmarshalString") unmarshalStringIdKey
692 checkDotnetResName = varQual dOTNET FSLIT("checkResult") checkDotnetResNameIdKey
695 %************************************************************************
697 \subsection{Local helpers}
699 %************************************************************************
701 All these are original names; hence mkOrig
704 varQual = mk_known_key_name varName
705 tcQual = mk_known_key_name tcName
706 clsQual = mk_known_key_name clsName
708 mk_known_key_name space mod str uniq
709 = mkExternalName uniq mod (mkOccNameFS space str) noSrcSpan
711 conName :: Module -> FastString -> Unique -> Name
713 = mkExternalName uniq mod (mkOccNameFS dataName occ) noSrcSpan
715 methName :: Module -> FastString -> Unique -> Name
716 methName mod occ uniq
717 = mkExternalName uniq mod (mkVarOccFS occ) noSrcSpan
720 %************************************************************************
722 \subsubsection[Uniques-prelude-Classes]{@Uniques@ for wired-in @Classes@}
724 %************************************************************************
725 --MetaHaskell extension hand allocate keys here
728 boundedClassKey = mkPreludeClassUnique 1
729 enumClassKey = mkPreludeClassUnique 2
730 eqClassKey = mkPreludeClassUnique 3
731 floatingClassKey = mkPreludeClassUnique 5
732 fractionalClassKey = mkPreludeClassUnique 6
733 integralClassKey = mkPreludeClassUnique 7
734 monadClassKey = mkPreludeClassUnique 8
735 dataClassKey = mkPreludeClassUnique 9
736 functorClassKey = mkPreludeClassUnique 10
737 numClassKey = mkPreludeClassUnique 11
738 ordClassKey = mkPreludeClassUnique 12
739 readClassKey = mkPreludeClassUnique 13
740 realClassKey = mkPreludeClassUnique 14
741 realFloatClassKey = mkPreludeClassUnique 15
742 realFracClassKey = mkPreludeClassUnique 16
743 showClassKey = mkPreludeClassUnique 17
744 ixClassKey = mkPreludeClassUnique 18
746 typeableClassKey = mkPreludeClassUnique 20
747 typeable1ClassKey = mkPreludeClassUnique 21
748 typeable2ClassKey = mkPreludeClassUnique 22
749 typeable3ClassKey = mkPreludeClassUnique 23
750 typeable4ClassKey = mkPreludeClassUnique 24
751 typeable5ClassKey = mkPreludeClassUnique 25
752 typeable6ClassKey = mkPreludeClassUnique 26
753 typeable7ClassKey = mkPreludeClassUnique 27
755 monadFixClassKey = mkPreludeClassUnique 28
757 monadPlusClassKey = mkPreludeClassUnique 30
758 randomClassKey = mkPreludeClassUnique 31
759 randomGenClassKey = mkPreludeClassUnique 32
761 isStringClassKey = mkPreludeClassUnique 33
764 %************************************************************************
766 \subsubsection[Uniques-prelude-TyCons]{@Uniques@ for wired-in @TyCons@}
768 %************************************************************************
771 addrPrimTyConKey = mkPreludeTyConUnique 1
772 arrayPrimTyConKey = mkPreludeTyConUnique 3
773 boolTyConKey = mkPreludeTyConUnique 4
774 byteArrayPrimTyConKey = mkPreludeTyConUnique 5
775 charPrimTyConKey = mkPreludeTyConUnique 7
776 charTyConKey = mkPreludeTyConUnique 8
777 doublePrimTyConKey = mkPreludeTyConUnique 9
778 doubleTyConKey = mkPreludeTyConUnique 10
779 floatPrimTyConKey = mkPreludeTyConUnique 11
780 floatTyConKey = mkPreludeTyConUnique 12
781 funTyConKey = mkPreludeTyConUnique 13
782 intPrimTyConKey = mkPreludeTyConUnique 14
783 intTyConKey = mkPreludeTyConUnique 15
784 int8TyConKey = mkPreludeTyConUnique 16
785 int16TyConKey = mkPreludeTyConUnique 17
786 int32PrimTyConKey = mkPreludeTyConUnique 18
787 int32TyConKey = mkPreludeTyConUnique 19
788 int64PrimTyConKey = mkPreludeTyConUnique 20
789 int64TyConKey = mkPreludeTyConUnique 21
790 integerTyConKey = mkPreludeTyConUnique 22
791 listTyConKey = mkPreludeTyConUnique 23
792 foreignObjPrimTyConKey = mkPreludeTyConUnique 24
793 weakPrimTyConKey = mkPreludeTyConUnique 27
794 mutableArrayPrimTyConKey = mkPreludeTyConUnique 28
795 mutableByteArrayPrimTyConKey = mkPreludeTyConUnique 29
796 orderingTyConKey = mkPreludeTyConUnique 30
797 mVarPrimTyConKey = mkPreludeTyConUnique 31
798 ratioTyConKey = mkPreludeTyConUnique 32
799 rationalTyConKey = mkPreludeTyConUnique 33
800 realWorldTyConKey = mkPreludeTyConUnique 34
801 stablePtrPrimTyConKey = mkPreludeTyConUnique 35
802 stablePtrTyConKey = mkPreludeTyConUnique 36
804 anyPrimTyConKey = mkPreludeTyConUnique 37
805 anyPrimTyCon1Key = mkPreludeTyConUnique 38
807 statePrimTyConKey = mkPreludeTyConUnique 50
808 stableNamePrimTyConKey = mkPreludeTyConUnique 51
809 stableNameTyConKey = mkPreludeTyConUnique 52
810 mutVarPrimTyConKey = mkPreludeTyConUnique 55
811 ioTyConKey = mkPreludeTyConUnique 56
812 wordPrimTyConKey = mkPreludeTyConUnique 58
813 wordTyConKey = mkPreludeTyConUnique 59
814 word8TyConKey = mkPreludeTyConUnique 60
815 word16TyConKey = mkPreludeTyConUnique 61
816 word32PrimTyConKey = mkPreludeTyConUnique 62
817 word32TyConKey = mkPreludeTyConUnique 63
818 word64PrimTyConKey = mkPreludeTyConUnique 64
819 word64TyConKey = mkPreludeTyConUnique 65
820 liftedConKey = mkPreludeTyConUnique 66
821 unliftedConKey = mkPreludeTyConUnique 67
822 anyBoxConKey = mkPreludeTyConUnique 68
823 kindConKey = mkPreludeTyConUnique 69
824 boxityConKey = mkPreludeTyConUnique 70
825 typeConKey = mkPreludeTyConUnique 71
826 threadIdPrimTyConKey = mkPreludeTyConUnique 72
827 bcoPrimTyConKey = mkPreludeTyConUnique 73
828 ptrTyConKey = mkPreludeTyConUnique 74
829 funPtrTyConKey = mkPreludeTyConUnique 75
830 tVarPrimTyConKey = mkPreludeTyConUnique 76
832 -- Generic Type Constructors
833 crossTyConKey = mkPreludeTyConUnique 79
834 plusTyConKey = mkPreludeTyConUnique 80
835 genUnitTyConKey = mkPreludeTyConUnique 81
837 -- Parallel array type constructor
838 parrTyConKey = mkPreludeTyConUnique 82
841 objectTyConKey = mkPreludeTyConUnique 83
843 eitherTyConKey = mkPreludeTyConUnique 84
845 -- Super Kinds constructors
846 tySuperKindTyConKey = mkPreludeTyConUnique 85
847 coSuperKindTyConKey = mkPreludeTyConUnique 86
850 liftedTypeKindTyConKey = mkPreludeTyConUnique 87
851 openTypeKindTyConKey = mkPreludeTyConUnique 88
852 unliftedTypeKindTyConKey = mkPreludeTyConUnique 89
853 ubxTupleKindTyConKey = mkPreludeTyConUnique 90
854 argTypeKindTyConKey = mkPreludeTyConUnique 91
856 -- Coercion constructors
857 symCoercionTyConKey = mkPreludeTyConUnique 93
858 transCoercionTyConKey = mkPreludeTyConUnique 94
859 leftCoercionTyConKey = mkPreludeTyConUnique 95
860 rightCoercionTyConKey = mkPreludeTyConUnique 96
861 instCoercionTyConKey = mkPreludeTyConUnique 97
862 unsafeCoercionTyConKey = mkPreludeTyConUnique 98
864 unknownTyConKey = mkPreludeTyConUnique 99
865 unknown1TyConKey = mkPreludeTyConUnique 130
866 unknown2TyConKey = mkPreludeTyConUnique 131
867 unknown3TyConKey = mkPreludeTyConUnique 132
868 opaqueTyConKey = mkPreludeTyConUnique 133
870 stringTyConKey = mkPreludeTyConUnique 134
872 ---------------- Template Haskell -------------------
873 -- USES TyConUniques 100-129
874 -----------------------------------------------------
876 unitTyConKey = mkTupleTyConUnique Boxed 0
879 %************************************************************************
881 \subsubsection[Uniques-prelude-DataCons]{@Uniques@ for wired-in @DataCons@}
883 %************************************************************************
886 charDataConKey = mkPreludeDataConUnique 1
887 consDataConKey = mkPreludeDataConUnique 2
888 doubleDataConKey = mkPreludeDataConUnique 3
889 falseDataConKey = mkPreludeDataConUnique 4
890 floatDataConKey = mkPreludeDataConUnique 5
891 intDataConKey = mkPreludeDataConUnique 6
892 smallIntegerDataConKey = mkPreludeDataConUnique 7
893 largeIntegerDataConKey = mkPreludeDataConUnique 8
894 nilDataConKey = mkPreludeDataConUnique 11
895 ratioDataConKey = mkPreludeDataConUnique 12
896 stableNameDataConKey = mkPreludeDataConUnique 14
897 trueDataConKey = mkPreludeDataConUnique 15
898 wordDataConKey = mkPreludeDataConUnique 16
899 ioDataConKey = mkPreludeDataConUnique 17
901 -- Generic data constructors
902 crossDataConKey = mkPreludeDataConUnique 20
903 inlDataConKey = mkPreludeDataConUnique 21
904 inrDataConKey = mkPreludeDataConUnique 22
905 genUnitDataConKey = mkPreludeDataConUnique 23
907 -- Data constructor for parallel arrays
908 parrDataConKey = mkPreludeDataConUnique 24
910 leftDataConKey = mkPreludeDataConUnique 25
911 rightDataConKey = mkPreludeDataConUnique 26
914 %************************************************************************
916 \subsubsection[Uniques-prelude-Ids]{@Uniques@ for wired-in @Ids@ (except @DataCons@)}
918 %************************************************************************
921 absentErrorIdKey = mkPreludeMiscIdUnique 1
922 augmentIdKey = mkPreludeMiscIdUnique 3
923 appendIdKey = mkPreludeMiscIdUnique 4
924 buildIdKey = mkPreludeMiscIdUnique 5
925 errorIdKey = mkPreludeMiscIdUnique 6
926 foldlIdKey = mkPreludeMiscIdUnique 7
927 foldrIdKey = mkPreludeMiscIdUnique 8
928 recSelErrorIdKey = mkPreludeMiscIdUnique 9
929 integerMinusOneIdKey = mkPreludeMiscIdUnique 10
930 integerPlusOneIdKey = mkPreludeMiscIdUnique 11
931 integerPlusTwoIdKey = mkPreludeMiscIdUnique 12
932 integerZeroIdKey = mkPreludeMiscIdUnique 13
933 int2IntegerIdKey = mkPreludeMiscIdUnique 14
934 seqIdKey = mkPreludeMiscIdUnique 15
935 irrefutPatErrorIdKey = mkPreludeMiscIdUnique 16
936 eqStringIdKey = mkPreludeMiscIdUnique 17
937 noMethodBindingErrorIdKey = mkPreludeMiscIdUnique 18
938 nonExhaustiveGuardsErrorIdKey = mkPreludeMiscIdUnique 19
939 runtimeErrorIdKey = mkPreludeMiscIdUnique 20
940 parErrorIdKey = mkPreludeMiscIdUnique 21
941 parIdKey = mkPreludeMiscIdUnique 22
942 patErrorIdKey = mkPreludeMiscIdUnique 23
943 realWorldPrimIdKey = mkPreludeMiscIdUnique 24
944 recConErrorIdKey = mkPreludeMiscIdUnique 25
945 recUpdErrorIdKey = mkPreludeMiscIdUnique 26
946 traceIdKey = mkPreludeMiscIdUnique 27
947 unpackCStringUtf8IdKey = mkPreludeMiscIdUnique 28
948 unpackCStringAppendIdKey = mkPreludeMiscIdUnique 29
949 unpackCStringFoldrIdKey = mkPreludeMiscIdUnique 30
950 unpackCStringIdKey = mkPreludeMiscIdUnique 31
952 unsafeCoerceIdKey = mkPreludeMiscIdUnique 32
953 concatIdKey = mkPreludeMiscIdUnique 33
954 filterIdKey = mkPreludeMiscIdUnique 34
955 zipIdKey = mkPreludeMiscIdUnique 35
956 bindIOIdKey = mkPreludeMiscIdUnique 36
957 returnIOIdKey = mkPreludeMiscIdUnique 37
958 deRefStablePtrIdKey = mkPreludeMiscIdUnique 38
959 newStablePtrIdKey = mkPreludeMiscIdUnique 39
960 plusIntegerIdKey = mkPreludeMiscIdUnique 41
961 timesIntegerIdKey = mkPreludeMiscIdUnique 42
962 printIdKey = mkPreludeMiscIdUnique 43
963 failIOIdKey = mkPreludeMiscIdUnique 44
964 nullAddrIdKey = mkPreludeMiscIdUnique 46
965 voidArgIdKey = mkPreludeMiscIdUnique 47
966 fstIdKey = mkPreludeMiscIdUnique 49
967 sndIdKey = mkPreludeMiscIdUnique 50
968 otherwiseIdKey = mkPreludeMiscIdUnique 51
969 assertIdKey = mkPreludeMiscIdUnique 53
970 runSTRepIdKey = mkPreludeMiscIdUnique 54
972 rootMainKey = mkPreludeMiscIdUnique 55
973 runMainKey = mkPreludeMiscIdUnique 56
975 andIdKey = mkPreludeMiscIdUnique 57
976 orIdKey = mkPreludeMiscIdUnique 58
977 thenIOIdKey = mkPreludeMiscIdUnique 59
978 lazyIdKey = mkPreludeMiscIdUnique 60
979 assertErrorIdKey = mkPreludeMiscIdUnique 61
981 breakpointIdKey = mkPreludeMiscIdUnique 62
982 breakpointCondIdKey = mkPreludeMiscIdUnique 63
983 breakpointAutoIdKey = mkPreludeMiscIdUnique 64
984 breakpointJumpIdKey = mkPreludeMiscIdUnique 65
985 breakpointCondJumpIdKey = mkPreludeMiscIdUnique 66
986 breakpointAutoJumpIdKey = mkPreludeMiscIdUnique 67
988 inlineIdKey = mkPreludeMiscIdUnique 68
990 mapIdKey = mkPreludeMiscIdUnique 69
991 groupWithIdKey = mkPreludeMiscIdUnique 70
993 -- Parallel array functions
994 singletonPIdKey = mkPreludeMiscIdUnique 79
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 crossMapPIdKey = 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 fromStringClassOpKey = mkPreludeMiscIdUnique 125
1055 ---------------- Template Haskell -------------------
1056 -- USES IdUniques 200-399
1057 -----------------------------------------------------
1061 %************************************************************************
1063 \subsection{Standard groups of types}
1065 %************************************************************************
1078 %************************************************************************
1080 \subsection[Class-std-groups]{Standard groups of Prelude classes}
1082 %************************************************************************
1084 NOTE: @Eq@ and @Text@ do need to appear in @standardClasses@
1085 even though every numeric class has these two as a superclass,
1086 because the list of ambiguous dictionaries hasn't been simplified.
1094 ++ fractionalClassKeys
1096 fractionalClassKeys =
1097 [ fractionalClassKey
1103 -- the strictness analyser needs to know about numeric types
1104 -- (see SaAbsInt.lhs)
1105 needsDataDeclCtxtClassKeys = -- see comments in TcDeriv
1109 -- The "standard classes" are used in defaulting (Haskell 98 report 4.3.4),
1110 -- and are: "classes defined in the Prelude or a standard library"
1111 standardClassKeys = derivableClassKeys ++ numericClassKeys
1112 ++ [randomClassKey, randomGenClassKey,
1114 monadClassKey, monadPlusClassKey,
1119 @derivableClassKeys@ is also used in checking \tr{deriving} constructs
1124 = [ eqClassKey, ordClassKey, enumClassKey, ixClassKey,
1125 boundedClassKey, showClassKey, readClassKey ]