X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fprelude%2FTysPrim.lhs;h=2f6168bafb0cf1c8e1146c37d7ff58cc9816650f;hb=9d7da331989abcd1844e9d03b8d1e4163796fa85;hp=b28506e67717a9f72bc408ce3878d9862fb62787;hpb=09e2c3a13ed67e2ab69a8e0a3eaa608e19713521;p=ghc-hetmet.git diff --git a/ghc/compiler/prelude/TysPrim.lhs b/ghc/compiler/prelude/TysPrim.lhs index b28506e..2f6168b 100644 --- a/ghc/compiler/prelude/TysPrim.lhs +++ b/ghc/compiler/prelude/TysPrim.lhs @@ -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 ( mkOccFS, tcName, mkTyVarOcc ) +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 @@ -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} %* * %************************************************************************