X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Foreign%2FMarshal%2FPool.hs;h=a2a73ace8185a9769c3bd763aae0eddbca7a6c08;hb=9fdbf0f92b42f8e64b1f6a4c2c60fe4595852b51;hp=20be91ac7dcd98cb89109af9d37d868587087077;hpb=d539a9457e2c79a9f13744d073d3f253ea2fb33e;p=ghc-base.git diff --git a/Foreign/Marshal/Pool.hs b/Foreign/Marshal/Pool.hs index 20be91a..a2a73ac 100644 --- a/Foreign/Marshal/Pool.hs +++ b/Foreign/Marshal/Pool.hs @@ -1,11 +1,11 @@ -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS_GHC -fno-implicit-prelude #-} -------------------------------------------------------------------------------- -- | -- Module : Foreign.Marshal.Pool --- Copyright : (c) Sven Panne 2003 +-- Copyright : (c) Sven Panne 2002-2004 -- License : BSD-style (see the file libraries/base/LICENSE) -- --- Maintainer : sven_panne@yahoo.com +-- Maintainer : sven.panne@aedion.de -- Stability : provisional -- Portability : portable -- @@ -116,7 +116,7 @@ withPool = bracket newPool freePool pooledMalloc :: Storable a => Pool -> IO (Ptr a) pooledMalloc = pm undefined where - pm :: Storable a => a -> Pool -> IO (Ptr a) + pm :: Storable a' => a' -> Pool -> IO (Ptr a') pm dummy pool = pooledMallocBytes pool (sizeOf dummy) -- | Allocate the given number of bytes of storage in the pool. @@ -134,7 +134,7 @@ pooledMallocBytes (Pool pool) size = do pooledRealloc :: Storable a => Pool -> Ptr a -> IO (Ptr a) pooledRealloc = pr undefined where - pr :: Storable a => a -> Pool -> Ptr a -> IO (Ptr a) + pr :: Storable a' => a' -> Pool -> Ptr a' -> IO (Ptr a') pr dummy pool ptr = pooledReallocBytes pool ptr (sizeOf dummy) -- | Adjust the storage area for an element in the pool to the given size. @@ -154,7 +154,7 @@ pooledReallocBytes (Pool pool) ptr size = do pooledMallocArray :: Storable a => Pool -> Int -> IO (Ptr a) pooledMallocArray = pma undefined where - pma :: Storable a => a -> Pool -> Int -> IO (Ptr a) + pma :: Storable a' => a' -> Pool -> Int -> IO (Ptr a') pma dummy pool size = pooledMallocBytes pool (size * sizeOf dummy) -- | Allocate storage for the given number of elements of a storable type in the @@ -169,7 +169,7 @@ pooledMallocArray0 pool size = pooledReallocArray :: Storable a => Pool -> Ptr a -> Int -> IO (Ptr a) pooledReallocArray = pra undefined where - pra :: Storable a => a -> Pool -> Ptr a -> Int -> IO (Ptr a) + pra :: Storable a' => a' -> Pool -> Ptr a' -> Int -> IO (Ptr a') pra dummy pool ptr size = pooledReallocBytes pool ptr (size * sizeOf dummy) -- | Adjust the size of an array with an end marker in the given pool.