[project @ 2004-03-27 13:18:12 by panne]
[ghc-base.git] / GHC / Stable.lhs
index 0fc7e33..9a55a68 100644 (file)
@@ -1,13 +1,18 @@
-% -----------------------------------------------------------------------------
-% $Id: Stable.lhs,v 1.2 2002/03/14 12:09:52 simonmar Exp $
-%
-% (c) The GHC Team, 1992-2000
-%
-
-\section{Module @GHC.Stable@}
-
 \begin{code}
 {-# OPTIONS -fno-implicit-prelude #-}
+-----------------------------------------------------------------------------
+-- |
+-- Module      :  GHC.Stable
+-- Copyright   :  (c) The University of Glasgow, 1992-2002
+-- License     :  see libraries/base/LICENSE
+-- 
+-- Maintainer  :  ffi@haskell.org
+-- Stability   :  internal
+-- Portability :  non-portable (GHC Extensions)
+--
+-- Stable pointers.
+--
+-----------------------------------------------------------------------------
 
 module GHC.Stable 
        ( StablePtr(..)
@@ -27,9 +32,6 @@ import GHC.IOBase
 
 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 #)
@@ -37,7 +39,7 @@ newStablePtr a = IO $ \ s ->
 deRefStablePtr :: StablePtr a -> IO a
 deRefStablePtr (StablePtr sp) = IO $ \s -> deRefStablePtr# sp s
 
-foreign import unsafe freeStablePtr :: StablePtr a -> IO ()
+foreign import ccall unsafe freeStablePtr :: StablePtr a -> IO ()
 
 castStablePtrToPtr :: StablePtr a -> Ptr ()
 castStablePtrToPtr (StablePtr s) = Ptr (unsafeCoerce# s)