[project @ 2002-04-26 13:34:05 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/core/LICENSE)
7 -- 
8 -- Maintainer  :  ffi@haskell.org
9 -- Stability   :  provisional
10 -- Portability :  portable
11 --
12 -- A class for primitive marshaling
13 --
14 -----------------------------------------------------------------------------
15
16 module Foreign.Storable
17         ( Storable(
18              sizeOf,         -- :: a -> Int
19              alignment,      -- :: a -> Int
20              peekElemOff,    -- :: Ptr a -> Int      -> IO a
21              pokeElemOff,    -- :: Ptr a -> Int -> a -> IO ()
22              peekByteOff,    -- :: Ptr b -> Int      -> IO a
23              pokeByteOff,    -- :: Ptr b -> Int -> a -> IO ()
24              peek,           -- :: Ptr a             -> IO a
25              poke)           -- :: Ptr a        -> a -> IO ()
26         ) where
27
28 #ifdef __GLASGOW_HASKELL__
29 import GHC.Storable
30 #endif