[project @ 2002-04-26 13:34:05 by simonmar]
[ghc-base.git] / Foreign / StablePtr.hs
1 {-# OPTIONS -fno-implicit-prelude #-}
2 -----------------------------------------------------------------------------
3 -- |
4 -- Module      :  Foreign.StablePtr
5 -- Copyright   :  (c) The University of Glasgow 2001
6 -- License     :  BSD-style (see the file libraries/core/LICENSE)
7 -- 
8 -- Maintainer  :  ffi@haskell.org
9 -- Stability   :  provisional
10 -- Portability :  portable
11 --
12 -- Stable pointers.
13 --
14 -----------------------------------------------------------------------------
15
16 module Foreign.StablePtr
17         ( StablePtr,         -- abstract
18         , newStablePtr       -- :: a -> IO (StablePtr a)
19         , deRefStablePtr     -- :: StablePtr a -> IO a
20         , freeStablePtr      -- :: StablePtr a -> IO ()
21         , castStablePtrToPtr -- :: StablePtr a -> Ptr ()
22         , castPtrToStablePtr -- :: Ptr () -> StablePtr a
23         ) where
24
25 #ifdef __GLASGOW_HASKELL__
26 import GHC.Stable
27 import GHC.Err
28 #endif