Merge branch 'master' into type-nats
[packages/base.git] / Foreign.hs
1 {-# LANGUAGE Unsafe #-}
2 {-# LANGUAGE NoImplicitPrelude #-}
3
4 -----------------------------------------------------------------------------
5 -- |
6 -- Module : Foreign
7 -- Copyright : (c) The FFI task force 2001
8 -- License : BSD-style (see the file libraries/base/LICENSE)
9 --
10 -- Maintainer : ffi@haskell.org
11 -- Stability : provisional
12 -- Portability : portable
13 --
14 -- A collection of data types, classes, and functions for interfacing
15 -- with another programming language.
16 --
17 -----------------------------------------------------------------------------
18
19 module Foreign
20 ( module Data.Bits
21 , module Data.Int
22 , module Data.Word
23 , module Foreign.Ptr
24 , module Foreign.ForeignPtr
25 , module Foreign.StablePtr
26 , module Foreign.Storable
27 , module Foreign.Marshal
28
29 -- * Unsafe Functions
30
31 -- | 'unsafePerformIO' is exported here for backwards
32 -- compatibility reasons only. For doing local marshalling in
33 -- the FFI, use 'unsafeLocalState'. For other uses, see
34 -- 'System.IO.Unsafe.unsafePerformIO'.
35 , unsafePerformIO
36 ) where
37
38 import Data.Bits
39 import Data.Int
40 import Data.Word
41 import Foreign.Ptr
42 import Foreign.ForeignPtr
43 import Foreign.StablePtr
44 import Foreign.Storable
45 import Foreign.Marshal
46
47 import GHC.IO (IO)
48 import qualified GHC.IO (unsafePerformIO)
49
50 {-# DEPRECATED unsafePerformIO "Use System.IO.Unsafe.unsafePerformIO instead; This function will be removed in the next release" #-}
51
52 {-# INLINE unsafePerformIO #-}
53 unsafePerformIO :: IO a -> a
54 unsafePerformIO = GHC.IO.unsafePerformIO
55