summaryrefslogtreecommitdiff
path: root/ghc/compiler/prelude/TysPrim.lhs
diff options
context:
space:
mode:
authorpartain <unknown>1996-05-17 16:05:10 +0000
committerpartain <unknown>1996-05-17 16:05:10 +0000
commitdabfa71f33eabc5a2d10959728f772aa016f1c84 (patch)
tree927731b8c14fb245be82312436ed2c510643653b /ghc/compiler/prelude/TysPrim.lhs
parentf3998ec18fd0f3d56b377d41e2a2958aaf9460ec (diff)
downloadhaskell-dabfa71f33eabc5a2d10959728f772aa016f1c84.tar.gz
[project @ 1996-05-17 16:02:43 by partain]
Sansom 1.3 changes through 960507
Diffstat (limited to 'ghc/compiler/prelude/TysPrim.lhs')
-rw-r--r--ghc/compiler/prelude/TysPrim.lhs21
1 files changed, 11 insertions, 10 deletions
diff --git a/ghc/compiler/prelude/TysPrim.lhs b/ghc/compiler/prelude/TysPrim.lhs
index a64821db44..28b4571219 100644
--- a/ghc/compiler/prelude/TysPrim.lhs
+++ b/ghc/compiler/prelude/TysPrim.lhs
@@ -182,25 +182,26 @@ mkStablePtrPrimTy ty = applyTyCon stablePtrPrimTyCon [ty]
%************************************************************************
%* *
-\subsection[TysPrim-malloc-ptrs]{The ``malloc''-pointer type}
+\subsection[TysPrim-foreign-objs]{The ``foreign object'' type}
%* *
%************************************************************************
-``Malloc'' pointers provide a mechanism which will let Haskell's
-garbage collector communicate with a {\em simple\/} garbage collector
-in the IO world (probably \tr{malloc}, hence the name).We want Haskell
-to be able to hold onto references to objects in the IO world and for
-Haskell's garbage collector to tell the IO world when these references
-become garbage. We are not aiming to provide a mechanism that could
+Foreign objects (formerly ``Malloc'' pointers) provide a mechanism which
+will let Haskell's garbage collector communicate with a {\em simple\/}
+garbage collector in the IO world. We want Haskell to be able to hold
+onto references to objects in the IO world and for Haskell's garbage
+collector to tell the IO world when these references become garbage.
+We are not aiming to provide a mechanism that could
talk to a sophisticated garbage collector such as that provided by a
LISP system (with a correspondingly complex interface); in particular,
we shall ignore the danger of circular structures spread across the
two systems.
-There are no primitive operations on @CHeapPtr#@s (although equality
+There are no primitive operations on @ForeignObj#@s (although equality
could possibly be added?)
\begin{code}
-mallocPtrPrimTyCon = pcPrimTyCon mallocPtrPrimTyConKey SLIT("MallocPtr#") 0
- (\ [] -> MallocPtrRep)
+foreignObjPrimTy = applyTyCon foreignObjPrimTyCon []
+foreignObjPrimTyCon = pcPrimTyCon foreignObjPrimTyConKey SLIT("ForeignObj#") 0
+ (\ [] -> ForeignObjRep)
\end{code}