remove empty dir
[ghc-hetmet.git] / ghc / compiler / prelude / TysPrim.lhs
index 155fdf8..2f6168b 100644 (file)
@@ -33,7 +33,6 @@ module TysPrim(
        stableNamePrimTyCon,            mkStableNamePrimTy,
        bcoPrimTyCon,                   bcoPrimTy,
        weakPrimTyCon,                  mkWeakPrimTy,
-       foreignObjPrimTyCon,            foreignObjPrimTy,
        threadIdPrimTyCon,              threadIdPrimTy,
        
        int32PrimTyCon,         int32PrimTy,
@@ -47,7 +46,7 @@ module TysPrim(
 
 import Var             ( TyVar, mkTyVar )
 import Name            ( Name, BuiltInSyntax(..), mkInternalName, mkWiredInName )
-import OccName         ( mkVarOcc, mkOccFS, tcName )
+import OccName         ( mkOccNameFS, tcName, mkTyVarOcc )
 import TyCon           ( TyCon, ArgVrcs, mkPrimTyCon, mkLiftedPrimTyCon,
                          PrimRep(..) )
 import Type            ( mkTyConApp, mkTyConTy, mkTyVarTys, mkTyVarTy,
@@ -82,7 +81,6 @@ primTyCons
     , intPrimTyCon
     , int32PrimTyCon
     , int64PrimTyCon
-    , foreignObjPrimTyCon
     , bcoPrimTyCon
     , weakPrimTyCon
     , mutableArrayPrimTyCon
@@ -102,7 +100,7 @@ primTyCons
 
 mkPrimTc :: FastString -> Unique -> TyCon -> Name
 mkPrimTc fs uniq tycon
-  = mkWiredInName gHC_PRIM (mkOccFS tcName fs) 
+  = mkWiredInName gHC_PRIM (mkOccNameFS tcName fs) 
                  uniq
                  Nothing               -- No parent object
                  (ATyCon tycon)        -- Relevant TyCon
@@ -129,7 +127,6 @@ mVarPrimTyConName         = mkPrimTc FSLIT("MVar#") mVarPrimTyConKey mVarPrimTyCon
 tVarPrimTyConName            = mkPrimTc FSLIT("TVar#") tVarPrimTyConKey tVarPrimTyCon
 stablePtrPrimTyConName        = mkPrimTc FSLIT("StablePtr#") stablePtrPrimTyConKey stablePtrPrimTyCon
 stableNamePrimTyConName       = mkPrimTc FSLIT("StableName#") stableNamePrimTyConKey stableNamePrimTyCon
-foreignObjPrimTyConName       = mkPrimTc FSLIT("ForeignObj#") foreignObjPrimTyConKey foreignObjPrimTyCon
 bcoPrimTyConName             = mkPrimTc FSLIT("BCO#") bcoPrimTyConKey bcoPrimTyCon
 weakPrimTyConName            = mkPrimTc FSLIT("Weak#") weakPrimTyConKey weakPrimTyCon
 threadIdPrimTyConName                = mkPrimTc FSLIT("ThreadId#") threadIdPrimTyConKey threadIdPrimTyCon
@@ -147,7 +144,7 @@ alphaTyVars is a list of type variables for use in templates:
 \begin{code}
 tyVarList :: Kind -> [TyVar]
 tyVarList kind = [ mkTyVar (mkInternalName (mkAlphaTyVarUnique u) 
-                               (mkVarOcc (mkFastString name))
+                               (mkTyVarOcc (mkFastString name))
                                noSrcLoc) kind
                 | u <- [2..],
                   let name | c <= 'z'  = [c]
@@ -353,27 +350,6 @@ mkStableNamePrimTy ty = mkTyConApp stableNamePrimTyCon [ty]
 
 %************************************************************************
 %*                                                                     *
-\subsection[TysPrim-foreign-objs]{The ``foreign object'' type}
-%*                                                                     *
-%************************************************************************
-
-A Foreign Object is just a boxed, unlifted, Addr#.  They're needed
-because finalisers (weak pointers) can't watch Addr#s, they can only
-watch heap-resident objects.  
-
-We can't use a lifted Addr# (such as Addr) because race conditions
-could bite us.  For example, if the program deconstructed the Addr
-before passing its contents to a ccall, and a weak pointer was
-watching the Addr, the weak pointer might deduce that the Addr was
-dead before it really was.
-
-\begin{code}
-foreignObjPrimTy    = mkTyConTy foreignObjPrimTyCon
-foreignObjPrimTyCon = pcPrimTyCon0 foreignObjPrimTyConName PtrRep
-\end{code}
-
-%************************************************************************
-%*                                                                     *
 \subsection[TysPrim-BCOs]{The ``bytecode object'' type}
 %*                                                                     *
 %************************************************************************