[project @ 2000-04-10 12:12:27 by simonpj]
[ghc-hetmet.git] / ghc / compiler / prelude / ThinAir.lhs
index af616fb..8852598 100644 (file)
@@ -7,12 +7,12 @@
 module ThinAir (
        thinAirIdNames, -- Names of non-wired-in Ids that may be used out of
        setThinAirIds,  -- thin air in any compilation. If they are not wired in
-       thinAirModules, -- we must be sure to import them from some Prelude 
+                       -- we must be sure to import them from some Prelude 
                        -- interface file even if they are not overtly 
                        -- mentioned.  Subset of builtinNames.
        -- Here are the thin-air Ids themselves
        addr2IntegerId,
-       packStringForCId, unpackCStringId, unpackCString2Id,
+       unpackCStringId, unpackCString2Id,
        unpackCStringAppendId, unpackCStringFoldrId,
        foldrId, buildId,
 
@@ -55,23 +55,19 @@ thinAirIdNames
   = map mkKnownKeyGlobal
     [
        -- Needed for converting literals to Integers (used in tidyCoreExpr)
-      (varQual pREL_BASE_Name SLIT("addr2Integer"), addr2IntegerIdKey)
-
-       -- String literals
-    , (varQual pREL_PACK_Name SLIT("packCString#"),   packCStringIdKey)
-    , (varQual pREL_PACK_Name SLIT("unpackCString#"), unpackCStringIdKey)
-    , (varQual pREL_PACK_Name SLIT("unpackNBytes#"),  unpackCString2IdKey)
-    , (varQual pREL_PACK_Name SLIT("unpackAppendCString#"), unpackCStringAppendIdKey)
-    , (varQual pREL_PACK_Name SLIT("unpackFoldrCString#"),  unpackCStringFoldrIdKey)
+      (varQual pREL_NUM_Name SLIT("addr2Integer"), addr2IntegerIdKey)
 
        -- Folds and builds; introduced by desugaring list comprehensions
+    , (varQual pREL_BASE_Name SLIT("unpackNBytes#"),  unpackCString2IdKey)
+    , (varQual pREL_BASE_Name SLIT("unpackCString#"), unpackCStringIdKey)
+    , (varQual pREL_BASE_Name SLIT("unpackAppendCString#"), unpackCStringAppendIdKey)
+    , (varQual pREL_BASE_Name SLIT("unpackFoldrCString#"),  unpackCStringFoldrIdKey)
+
     , (varQual pREL_BASE_Name SLIT("foldr"), foldrIdKey)
     , (varQual pREL_BASE_Name SLIT("build"), buildIdKey)
     ]
 
 varQual = mkPreludeQual varName
-
-thinAirModules = [pREL_PACK_Name,pREL_BASE_Name]       -- See notes with RnIfaces.findAndReadIface
 \end{code}
 
 
@@ -82,7 +78,6 @@ noRepStrIds = [unpackCString2Id, unpackCStringId]
 
 addr2IntegerId = lookupThinAirId addr2IntegerIdKey
 
-packStringForCId = lookupThinAirId packCStringIdKey
 unpackCStringId  = lookupThinAirId unpackCStringIdKey
 unpackCString2Id = lookupThinAirId unpackCString2IdKey 
 unpackCStringAppendId = lookupThinAirId unpackCStringAppendIdKey 
@@ -93,6 +88,7 @@ buildId = lookupThinAirId buildIdKey
 \end{code}
 
 \begin{code}
+{-# NOINLINE thinAirIdMapRef #-}
 thinAirIdMapRef :: IORef (UniqFM Id)
 thinAirIdMapRef = unsafePerformIO (newIORef (panic "thinAirIdMap: still empty"))