-\subsection{Wired in TyCons}
-%* *
-%************************************************************************
-
-\begin{code}
-wired_in_tycons = [funTyCon] ++
- prim_tycons ++
- tuple_tycons ++
- unboxed_tuple_tycons ++
- data_tycons
-
-prim_tycons
- = [ addrPrimTyCon
- , arrayPrimTyCon
- , byteArrayPrimTyCon
- , charPrimTyCon
- , doublePrimTyCon
- , floatPrimTyCon
- , intPrimTyCon
- , int64PrimTyCon
- , foreignObjPrimTyCon
- , weakPrimTyCon
- , mutableArrayPrimTyCon
- , mutableByteArrayPrimTyCon
- , mVarPrimTyCon
- , mutVarPrimTyCon
- , realWorldTyCon
- , stablePtrPrimTyCon
- , stableNamePrimTyCon
- , statePrimTyCon
- , threadIdPrimTyCon
- , wordPrimTyCon
- , word64PrimTyCon
- ]
-
-tuple_tycons = unitTyCon : [tupleTyCon i | i <- [2..37] ]
-unboxed_tuple_tycons = [unboxedTupleTyCon i | i <- [1..37] ]
-
-data_tycons
- = [ addrTyCon
- , boolTyCon
- , charTyCon
- , doubleTyCon
- , floatTyCon
- , intTyCon
- , integerTyCon
- , listTyCon
- , wordTyCon
- ]
-\end{code}
-
-
-%************************************************************************
-%* *
-\subsection{Built-in keys}
-%* *
-%************************************************************************
-
-Ids, Synonyms, Classes and ClassOps with builtin keys.
-
-\begin{code}
-ioTyCon_NAME = mkKnownKeyGlobal (ioTyCon_RDR, ioTyConKey)
-main_NAME = mkKnownKeyGlobal (main_RDR, mainKey)
-
- -- Operations needed when compiling FFI decls
-bindIO_NAME = mkKnownKeyGlobal (bindIO_RDR, bindIOIdKey)
-deRefStablePtr_NAME = mkKnownKeyGlobal (deRefStablePtr_RDR, deRefStablePtrIdKey)
-makeStablePtr_NAME = mkKnownKeyGlobal (makeStablePtr_RDR, makeStablePtrIdKey)
-
-knownKeyNames :: [Name]
-knownKeyNames
- = [main_NAME, ioTyCon_NAME]
- ++
- map mkKnownKeyGlobal
- [
- -- Type constructors (synonyms especially)
- (orderingTyCon_RDR, orderingTyConKey)
- , (rationalTyCon_RDR, rationalTyConKey)
- , (ratioDataCon_RDR, ratioDataConKey)
- , (ratioTyCon_RDR, ratioTyConKey)
- , (byteArrayTyCon_RDR, byteArrayTyConKey)
- , (mutableByteArrayTyCon_RDR, mutableByteArrayTyConKey)
- , (foreignObjTyCon_RDR, foreignObjTyConKey)
- , (stablePtrTyCon_RDR, stablePtrTyConKey)
- , (stablePtrDataCon_RDR, stablePtrDataConKey)
-
- -- Classes. *Must* include:
- -- classes that are grabbed by key (e.g., eqClassKey)
- -- classes in "Class.standardClassKeys" (quite a few)
- , (eqClass_RDR, eqClassKey) -- mentioned, derivable
- , (ordClass_RDR, ordClassKey) -- derivable
- , (boundedClass_RDR, boundedClassKey) -- derivable
- , (numClass_RDR, numClassKey) -- mentioned, numeric
- , (enumClass_RDR, enumClassKey) -- derivable
- , (monadClass_RDR, monadClassKey)
- , (monadPlusClass_RDR, monadPlusClassKey)
- , (functorClass_RDR, functorClassKey)
- , (showClass_RDR, showClassKey) -- derivable
- , (realClass_RDR, realClassKey) -- numeric
- , (integralClass_RDR, integralClassKey) -- numeric
- , (fractionalClass_RDR, fractionalClassKey) -- numeric
- , (floatingClass_RDR, floatingClassKey) -- numeric
- , (realFracClass_RDR, realFracClassKey) -- numeric
- , (realFloatClass_RDR, realFloatClassKey) -- numeric
- , (readClass_RDR, readClassKey) -- derivable
- , (ixClass_RDR, ixClassKey) -- derivable (but it isn't Prelude.Ix; hmmm)
- , (ccallableClass_RDR, cCallableClassKey) -- mentioned, ccallish
- , (creturnableClass_RDR, cReturnableClassKey) -- mentioned, ccallish
-
- -- ClassOps
- , (fromInt_RDR, fromIntClassOpKey)
- , (fromInteger_RDR, fromIntegerClassOpKey)
- , (ge_RDR, geClassOpKey)
- , (minus_RDR, minusClassOpKey)
- , (enumFrom_RDR, enumFromClassOpKey)
- , (enumFromThen_RDR, enumFromThenClassOpKey)
- , (enumFromTo_RDR, enumFromToClassOpKey)
- , (enumFromThenTo_RDR, enumFromThenToClassOpKey)
- , (fromEnum_RDR, fromEnumClassOpKey)
- , (toEnum_RDR, toEnumClassOpKey)
- , (eq_RDR, eqClassOpKey)
- , (thenM_RDR, thenMClassOpKey)
- , (returnM_RDR, returnMClassOpKey)
- , (failM_RDR, failMClassOpKey)
- , (fromRational_RDR, fromRationalClassOpKey)
-
- , (deRefStablePtr_RDR, deRefStablePtrIdKey)
- , (makeStablePtr_RDR, makeStablePtrIdKey)
- , (bindIO_RDR, bindIOIdKey)
-
- , (map_RDR, mapIdKey)
- , (append_RDR, appendIdKey)
-
- -- List operations
- , (concat_RDR, concatIdKey)
- , (filter_RDR, filterIdKey)
- , (zip_RDR, zipIdKey)
- , (build_RDR, buildIdKey)
- , (augment_RDR, augmentIdKey)
-
- -- FFI primitive types that are not wired-in.
- , (int8TyCon_RDR, int8TyConKey)
- , (int16TyCon_RDR, int16TyConKey)
- , (int32TyCon_RDR, int32TyConKey)
- , (int64TyCon_RDR, int64TyConKey)
- , (word8TyCon_RDR, word8TyConKey)
- , (word16TyCon_RDR, word16TyConKey)
- , (word32TyCon_RDR, word32TyConKey)
- , (word64TyCon_RDR, word64TyConKey)
-
- -- Others
- , (otherwiseId_RDR, otherwiseIdKey)
- , (assert_RDR, assertIdKey)
- , (runSTRep_RDR, runSTRepIdKey)
- ]
-\end{code}
-
-ToDo: make it do the ``like'' part properly (as in 0.26 and before).
-
-\begin{code}
-maybeCharLikeCon, maybeIntLikeCon :: DataCon -> Bool
-maybeCharLikeCon con = getUnique con == charDataConKey
-maybeIntLikeCon con = getUnique con == intDataConKey
-\end{code}
-
-%************************************************************************
-%* *
-\subsection{Commonly-used RdrNames}