[project @ 2002-02-12 15:17:13 by simonmar]
[ghc-hetmet.git] / ghc / lib / std / PrelStable.lhs
diff --git a/ghc/lib/std/PrelStable.lhs b/ghc/lib/std/PrelStable.lhs
deleted file mode 100644 (file)
index 2d6f8ae..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-% -----------------------------------------------------------------------------
-% $Id: PrelStable.lhs,v 1.9 2001/03/25 09:57:26 qrczak Exp $
-%
-% (c) The GHC Team, 1992-2000
-%
-
-\section{Module @PrelStable@}
-
-\begin{code}
-{-# OPTIONS -fno-implicit-prelude #-}
-
-module PrelStable 
-       ( StablePtr(..)
-       , newStablePtr    -- :: a -> IO (StablePtr a)    
-       , deRefStablePtr  -- :: StablePtr a -> a
-       , freeStablePtr   -- :: StablePtr a -> IO ()
-   ) where
-
-import PrelBase
-import PrelIOBase
-
------------------------------------------------------------------------------
--- Stable Pointers
-
-data StablePtr a = StablePtr (StablePtr# a)
-
-instance CCallable   (StablePtr a)
-instance CReturnable (StablePtr a)
-
-newStablePtr   :: a -> IO (StablePtr a)
-newStablePtr a = IO $ \ s ->
-    case makeStablePtr# a s of (# s', sp #) -> (# s', StablePtr sp #)
-
-deRefStablePtr :: StablePtr a -> IO a
-deRefStablePtr (StablePtr sp) = IO $ \s -> deRefStablePtr# sp s
-
-foreign import unsafe freeStablePtr :: StablePtr a -> IO ()
-
-instance Eq (StablePtr a) where 
-    (StablePtr sp1) == (StablePtr sp2) =
-       case eqStablePtr# sp1 sp2 of
-          0# -> False
-          _  -> True
-\end{code}