[project @ 1999-02-17 15:57:20 by simonm]
[ghc-hetmet.git] / ghc / compiler / prelude / PrelInfo.lhs
index c1e3a9d..cb0a306 100644 (file)
@@ -25,8 +25,7 @@ module PrelInfo (
 
 
        -- Here are the thin-air Ids themselves
-       int2IntegerId, addr2IntegerId,
-       integerMinusOneId, integerZeroId, integerPlusOneId, integerPlusTwoId,
+       addr2IntegerId,
        packStringForCId, unpackCStringId, unpackCString2Id,
        unpackCStringAppendId, unpackCStringFoldrId,
        foldrId,
@@ -258,16 +257,7 @@ thinAirIdNames
   = map mkKnownKeyGlobal
     [
        -- Needed for converting literals to Integers (used in tidyCoreExpr)
-      (varQual pREL_BASE SLIT("int2Integer"),  int2IntegerIdKey)       
-    , (varQual pREL_BASE SLIT("addr2Integer"), addr2IntegerIdKey)
-
-       -- OK, this is Will's idea: we should have magic values for Integers 0,
-       -- +1, +2, and -1 (go ahead, fire me):
-    , (varQual pREL_BASE SLIT("integer_0"),  integerZeroIdKey)    
-    , (varQual pREL_BASE SLIT("integer_1"),  integerPlusOneIdKey) 
-    , (varQual pREL_BASE SLIT("integer_2"),  integerPlusTwoIdKey) 
-    , (varQual pREL_BASE SLIT("integer_m1"), integerMinusOneIdKey)
-
+      (varQual pREL_BASE SLIT("addr2Integer"), addr2IntegerIdKey)
 
        -- String literals
     , (varQual pREL_PACK SLIT("packCString#"),   packCStringIdKey)
@@ -282,19 +272,12 @@ thinAirIdNames
 
 thinAirModules = [pREL_PACK]   -- See notes with RnIfaces.findAndReadIface
 
-noRepIntegerIds = [integerZeroId, integerPlusOneId, integerPlusTwoId, integerMinusOneId,
-                  int2IntegerId, addr2IntegerId]
+noRepIntegerIds = [addr2IntegerId]
 
 noRepStrIds = [unpackCString2Id, unpackCStringId]
 
-int2IntegerId  = lookupThinAirId int2IntegerIdKey
 addr2IntegerId = lookupThinAirId addr2IntegerIdKey
 
-integerMinusOneId = lookupThinAirId integerMinusOneIdKey
-integerZeroId     = lookupThinAirId integerZeroIdKey
-integerPlusOneId  = lookupThinAirId integerPlusOneIdKey
-integerPlusTwoId  = lookupThinAirId integerPlusTwoIdKey
-
 packStringForCId = lookupThinAirId packCStringIdKey
 unpackCStringId  = lookupThinAirId unpackCStringIdKey
 unpackCString2Id = lookupThinAirId unpackCString2IdKey 
@@ -365,6 +348,7 @@ knownKeyNames
     , (mutableByteArrayTyCon_RDR, mutableByteArrayTyConKey)
     , (foreignObjTyCon_RDR,    foreignObjTyConKey)
     , (stablePtrTyCon_RDR,     stablePtrTyConKey)
+    , (stablePtrDataCon_RDR,    stablePtrDataConKey)
 
        --  Classes.  *Must* include:
        --      classes that are grabbed by key (e.g., eqClassKey)
@@ -461,10 +445,11 @@ ratioDataCon_RDR  = dataQual pREL_NUM  SLIT(":%")
 byteArrayTyCon_RDR             = tcQual pREL_ARR  SLIT("ByteArray")
 mutableByteArrayTyCon_RDR      = tcQual pREL_ARR  SLIT("MutableByteArray")
 
-foreignObjTyCon_RDR    = tcQual  pREL_IO_BASE SLIT("ForeignObj")
-stablePtrTyCon_RDR     = tcQual  pREL_STABLE SLIT("StablePtr")
-deRefStablePtr_RDR      = varQual pREL_STABLE SLIT("deRefStablePtr")
-makeStablePtr_RDR       = varQual pREL_STABLE SLIT("makeStablePtr")
+foreignObjTyCon_RDR    = tcQual   pREL_IO_BASE SLIT("ForeignObj")
+stablePtrTyCon_RDR     = tcQual   pREL_STABLE SLIT("StablePtr")
+stablePtrDataCon_RDR   = dataQual pREL_STABLE SLIT("StablePtr")
+deRefStablePtr_RDR      = varQual  pREL_STABLE SLIT("deRefStablePtr")
+makeStablePtr_RDR       = varQual  pREL_STABLE SLIT("makeStablePtr")
 
 eqClass_RDR            = clsQual pREL_BASE SLIT("Eq")
 ordClass_RDR           = clsQual pREL_BASE SLIT("Ord")
@@ -611,7 +596,7 @@ deriving_occ_info
     , (ordClassKey,    [intTyCon_RDR, compose_RDR, eqTag_RDR])
                                -- EQ (from Ordering) is needed to force in the constructors
                                -- as well as the type constructor.
-    , (enumClassKey,   [intTyCon_RDR, and_RDR, map_RDR, plus_RDR, showsPrec_RDR, append_RDR]) 
+    , (enumClassKey,   [intTyCon_RDR, eq_RDR, ge_RDR, and_RDR, map_RDR, plus_RDR, showsPrec_RDR, append_RDR]) 
                                -- The last two Enum deps are only used to produce better
                                -- error msgs for derived toEnum methods.
     , (boundedClassKey,        [intTyCon_RDR])