[project @ 2002-04-24 16:31:37 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 -- $Id: Storable.hs,v 1.4 2002/04/24 16:31:44 simonmar Exp $
13 --
14 -- A class for primitive marshaling
15 --
16 -----------------------------------------------------------------------------
17
18 module Foreign.Storable
19         ( Storable(
20              sizeOf,         -- :: a -> Int
21              alignment,      -- :: a -> Int
22              peekElemOff,    -- :: Ptr a -> Int      -> IO a
23              pokeElemOff,    -- :: Ptr a -> Int -> a -> IO ()
24              peekByteOff,    -- :: Ptr b -> Int      -> IO a
25              pokeByteOff,    -- :: Ptr b -> Int -> a -> IO ()
26              peek,           -- :: Ptr a             -> IO a
27              poke)           -- :: Ptr a        -> a -> IO ()
28         ) where
29
30 #ifdef __GLASGOW_HASKELL__
31 import GHC.Storable
32 #endif