X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Foreign%2FMarshal%2FAlloc.hs;h=900c917034dcf45b2e40dfe468fab559c312819d;hb=29246dd4eb44d03cc48cbd894821d3c9501d8829;hp=ce167b5912d55e601828f94d7abdff8788987b02;hpb=5feea6f48f51876033b43bc6012f6f568ebfd397;p=ghc-base.git diff --git a/Foreign/Marshal/Alloc.hs b/Foreign/Marshal/Alloc.hs index ce167b5..900c917 100644 --- a/Foreign/Marshal/Alloc.hs +++ b/Foreign/Marshal/Alloc.hs @@ -24,17 +24,15 @@ module Foreign.Marshal.Alloc ( realloc, -- :: Storable b => Ptr a -> IO (Ptr b) reallocBytes, -- :: Ptr a -> Int -> IO (Ptr a) -#ifdef __HUGS__ - free, -- :: Ptr a -> IO () - finalizerFree -- :: FunPtr (Ptr a -> IO ()) -#else free -- :: Ptr a -> IO () +#ifdef __HUGS__ + , finalizerFree -- :: FunPtr (Ptr a -> IO ()) #endif ) where import Data.Maybe import Foreign.Ptr ( Ptr, nullPtr, FunPtr ) -import Foreign.C.TypesISO ( CSize ) +import Foreign.C.Types ( CSize, CInt(..) ) import Foreign.Storable ( Storable(sizeOf) ) #ifdef __GLASGOW_HASKELL__ @@ -44,8 +42,10 @@ import GHC.Real import GHC.Ptr import GHC.Err import GHC.Base -#else +#elsif defined(__HUGS__) import Control.Exception ( bracket ) +#else +import System.IO ( bracket ) #endif