From: ross Date: Thu, 12 Dec 2002 13:32:06 +0000 (+0000) Subject: [project @ 2002-12-12 13:32:06 by ross] X-Git-Tag: nhc98-1-18-release~785 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=13e2f599e470e1ea2025b5f97258b8489285e800;p=ghc-base.git [project @ 2002-12-12 13:32:06 by ross] Add an import for Hugs, and change some #ifdef __GLASGOW_HASKELL__ to #ifndef __NHC__ --- diff --git a/Foreign/ForeignPtr.hs b/Foreign/ForeignPtr.hs index 09958dc..3b37c6d 100644 --- a/Foreign/ForeignPtr.hs +++ b/Foreign/ForeignPtr.hs @@ -26,19 +26,20 @@ module Foreign.ForeignPtr , touchForeignPtr -- :: ForeignPtr a -> IO () , castForeignPtr -- :: ForeignPtr a -> ForeignPtr b -#ifdef __GLASGOW_HASKELL__ - -- * GHC extensions +#ifndef __NHC__ , mallocForeignPtr -- :: Storable a => IO (ForeignPtr a) , mallocForeignPtrBytes -- :: Int -> IO (ForeignPtr a) #endif ) where -#ifdef __GLASGOW_HASKELL__ +#ifndef __NHC__ import Foreign.Ptr import Foreign.Storable import Data.Dynamic +#endif +#ifdef __GLASGOW_HASKELL__ import GHC.Base import GHC.IOBase import GHC.Num @@ -59,10 +60,16 @@ import NHC.FFI ) #endif -#ifdef __GLASGOW_HASKELL__ +#ifdef __HUGS__ +import Hugs.ForeignPtr +#endif + +#ifndef __NHC__ #include "Dynamic.h" INSTANCE_TYPEABLE1(ForeignPtr,foreignPtrTc,"ForeignPtr") +#endif +#ifdef __GLASGOW_HASKELL__ -- |The type 'ForeignPtr' represents references to objects that are -- maintained in a foreign language, i.e., that are not part of the -- data structures usually managed by the Haskell storage manager.