[project @ 2005-04-07 23:36:48 by sof]
[ghc-base.git] / GHC / Stable.lhs
index 75506f8..0de033d 100644 (file)
@@ -1,5 +1,5 @@
 \begin{code}
-{-# OPTIONS -fno-implicit-prelude #-}
+{-# OPTIONS_GHC -fno-implicit-prelude #-}
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  GHC.Stable
@@ -14,6 +14,7 @@
 --
 -----------------------------------------------------------------------------
 
+-- #hide
 module GHC.Stable 
        ( StablePtr(..)
        , newStablePtr          -- :: a -> IO (StablePtr a)    
@@ -65,12 +66,12 @@ deRefStablePtr (StablePtr sp) = IO $ \s -> deRefStablePtr# sp s
 -- value. Afterwards, if the stable pointer is passed to
 -- 'deRefStablePtr' or 'freeStablePtr', the behaviour is
 -- undefined.  However, the stable pointer may still be passed to
--- 'castStablePtrToPtr', but the @Ptr ()@ value returned by
--- 'castStablePtrToPtr', in this case, is undefined (in
--- particular, it may be 'Ptr.nullPtr').  Nevertheless, the call
+-- 'castStablePtrToPtr', but the @'Foreign.Ptr.Ptr' ()@ value returned
+-- by 'castStablePtrToPtr', in this case, is undefined (in particular,
+-- it may be 'Foreign.Ptr.nullPtr').  Nevertheless, the call
 -- to 'castStablePtrToPtr' is guaranteed not to diverge.
 --
-foreign import ccall unsafe freeStablePtr :: StablePtr a -> IO ()
+foreign import ccall unsafe "hs_free_stable_ptr" freeStablePtr :: StablePtr a -> IO ()
 
 -- |
 -- Coerce a stable pointer to an address. No guarantees are made about