X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FStable.lhs;h=0de033d1c639a19ed0bb3975a8f17bc7da86e604;hb=ce95dd798cdf6068515e4e6e08fb8b3f9d65f79a;hp=75506f864be162f2a0622774b69fbaaac90bc7dd;hpb=368070d8c0f06f9f24dbf09df81930e88164869a;p=ghc-base.git diff --git a/GHC/Stable.lhs b/GHC/Stable.lhs index 75506f8..0de033d 100644 --- a/GHC/Stable.lhs +++ b/GHC/Stable.lhs @@ -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