[project @ 2002-12-12 13:32:06 by ross]
authorross <unknown>
Thu, 12 Dec 2002 13:32:06 +0000 (13:32 +0000)
committerross <unknown>
Thu, 12 Dec 2002 13:32:06 +0000 (13:32 +0000)
Add an import for Hugs, and change some #ifdef __GLASGOW_HASKELL__ to
#ifndef __NHC__

Foreign/ForeignPtr.hs

index 09958dc..3b37c6d 100644 (file)
@@ -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.