118a1a35f814800932ef5aca8ac1ebb43e9464c7
[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   :  experimental
10 -- Portability :  non-portable
11 --
12 -- $Id: Storable.hs,v 1.1 2001/06/28 14:15:03 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              destruct)       -- :: Ptr a             -> IO ()
29         ) where
30
31 #ifdef __GLASGOW_HASKELL__
32 import GHC.Storable
33 #endif