[project @ 2002-05-09 13:16:29 by simonmar]
[ghc-base.git] / Foreign / Storable.hs
1 {-# OPTIONS -fno-implicit-prelude #-}
2 -----------------------------------------------------------------------------
3 -- |
4 -- Module      :  Foreign.Storable
5 -- Copyright   :  (c) The FFI task force 2001
6 -- License     :  BSD-style (see the file libraries/base/LICENSE)
7 -- 
8 -- Maintainer  :  ffi@haskell.org
9 -- Stability   :  provisional
10 -- Portability :  portable
11 --
12 -- The module "Storable" provides most elementary support for
13 -- marshalling and is part of the language-independent portion of the
14 -- Foreign Function Interface (FFI), and will normally be imported via
15 -- the "Foreign" module.
16 --
17 -----------------------------------------------------------------------------
18
19 module Foreign.Storable
20         ( -- * The 'Storable' class
21           Storable(
22              sizeOf,         -- :: a -> Int
23              alignment,      -- :: a -> Int
24              peekElemOff,    -- :: Ptr a -> Int      -> IO a
25              pokeElemOff,    -- :: Ptr a -> Int -> a -> IO ()
26              peekByteOff,    -- :: Ptr b -> Int      -> IO a
27              pokeByteOff,    -- :: Ptr b -> Int -> a -> IO ()
28              peek,           -- :: Ptr a             -> IO a
29              poke)           -- :: Ptr a        -> a -> IO ()
30         ) where
31
32 #ifdef __GLASGOW_HASKELL__
33 import GHC.Storable
34 #endif