Add an import for Hugs, and change some #ifdef __GLASGOW_HASKELL__ to
#ifndef __NHC__
, touchForeignPtr -- :: ForeignPtr a -> IO ()
, castForeignPtr -- :: ForeignPtr a -> ForeignPtr b
, touchForeignPtr -- :: ForeignPtr a -> IO ()
, castForeignPtr -- :: ForeignPtr a -> ForeignPtr b
-#ifdef __GLASGOW_HASKELL__
- -- * GHC extensions
, mallocForeignPtr -- :: Storable a => IO (ForeignPtr a)
, mallocForeignPtrBytes -- :: Int -> IO (ForeignPtr a)
#endif
)
where
, mallocForeignPtr -- :: Storable a => IO (ForeignPtr a)
, mallocForeignPtrBytes -- :: Int -> IO (ForeignPtr a)
#endif
)
where
-#ifdef __GLASGOW_HASKELL__
import Foreign.Ptr
import Foreign.Storable
import Data.Dynamic
import Foreign.Ptr
import Foreign.Storable
import Data.Dynamic
+#ifdef __GLASGOW_HASKELL__
import GHC.Base
import GHC.IOBase
import GHC.Num
import GHC.Base
import GHC.IOBase
import GHC.Num
-#ifdef __GLASGOW_HASKELL__
+#ifdef __HUGS__
+import Hugs.ForeignPtr
+#endif
+
+#ifndef __NHC__
#include "Dynamic.h"
INSTANCE_TYPEABLE1(ForeignPtr,foreignPtrTc,"ForeignPtr")
#include "Dynamic.h"
INSTANCE_TYPEABLE1(ForeignPtr,foreignPtrTc,"ForeignPtr")
+#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.
-- |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.