stableNamePrimTyCon, mkStableNamePrimTy,
bcoPrimTyCon, bcoPrimTy,
weakPrimTyCon, mkWeakPrimTy,
- foreignObjPrimTyCon, foreignObjPrimTy,
threadIdPrimTyCon, threadIdPrimTy,
int32PrimTyCon, int32PrimTy,
import Var ( TyVar, mkTyVar )
import Name ( Name, BuiltInSyntax(..), mkInternalName, mkWiredInName )
-import OccName ( mkOccFS, tcName, mkTyVarOcc )
+import OccName ( mkOccNameFS, tcName, mkTyVarOcc )
import TyCon ( TyCon, ArgVrcs, mkPrimTyCon, mkLiftedPrimTyCon,
PrimRep(..) )
import Type ( mkTyConApp, mkTyConTy, mkTyVarTys, mkTyVarTy,
, intPrimTyCon
, int32PrimTyCon
, int64PrimTyCon
- , foreignObjPrimTyCon
, bcoPrimTyCon
, weakPrimTyCon
, mutableArrayPrimTyCon
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
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
%************************************************************************
%* *
-\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}
%* *
%************************************************************************