[project @ 2002-08-25 09:16:07 by panne]
[ghc-base.git] / GHC / Stable.lhs
index 691fe6c..80af1f2 100644 (file)
@@ -1,13 +1,18 @@
-% -----------------------------------------------------------------------------
-% $Id: Stable.lhs,v 1.1 2001/06/28 14:15:03 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(..)
@@ -18,8 +23,7 @@ module GHC.Stable
        , castPtrToStablePtr    -- :: Ptr () -> StablePtr a
    ) where
 
-import Foreign.Ptr
-
+import GHC.Ptr
 import GHC.Base
 import GHC.IOBase
 
@@ -38,7 +42,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)