SafeHaskell: Added SafeHaskell to base
[ghc.git] / libraries / base / Foreign / ForeignPtr.hs
1 {-# LANGUAGE SafeImports, CPP, NoImplicitPrelude #-}
2 #if sh_SAFE_DEFAULT
3 {-# LANGUAGE Trustworthy #-}
4 #endif
5 {-# OPTIONS_HADDOCK hide #-}
6
7 -----------------------------------------------------------------------------
8 -- |
9 -- Module : Foreign.ForeignPtr
10 -- Copyright : (c) The University of Glasgow 2001
11 -- License : BSD-style (see the file libraries/base/LICENSE)
12 --
13 -- Maintainer : ffi@haskell.org
14 -- Stability : provisional
15 -- Portability : portable
16 --
17 -- The 'ForeignPtr' type and operations. This module is part of the
18 -- Foreign Function Interface (FFI) and will usually be imported via
19 -- the "Foreign" module.
20 --
21 -----------------------------------------------------------------------------
22
23 module Foreign.ForeignPtr (
24 module Foreign.ForeignPtr.Safe
25 #if !sh_SAFE_DEFAULT
26 -- ** Unsafe low-level operations
27 , unsafeForeignPtrToPtr
28 #endif
29 ) where
30
31 import safe Foreign.ForeignPtr.Safe
32
33 #if !sh_SAFE_DEFAULT
34 import Foreign.Ptr ( Ptr )
35 import qualified Foreign.ForeignPtr.Unsafe as U
36
37 {-# DEPRECATED unsafeForeignPtrToPtr "Use Foreign.ForeignPtr.Unsafe.unsafeForeignPtrToPtr instead; This function will be removed in the next release" #-}
38 {-# INLINE unsafeForeignPtrToPtr #-}
39 unsafeForeignPtrToPtr :: ForeignPtr a -> Ptr a
40 unsafeForeignPtrToPtr = U.unsafeForeignPtrToPtr
41 #endif
42