[project @ 2003-05-27 16:57:09 by malcolm]
authormalcolm <unknown>
Tue, 27 May 2003 16:57:12 +0000 (16:57 +0000)
committermalcolm <unknown>
Tue, 27 May 2003 16:57:12 +0000 (16:57 +0000)
Unbreak for nhc98, after the addition of FinalizerPtr as a type synonym,
and the change of Foreign.C.Types to export all newtypes abstract.

Foreign/C/Error.hs
Foreign/ForeignPtr.hs
Foreign/Marshal/Alloc.hs
Foreign/Marshal/Utils.hs

index 613dd1a..c6106e0 100644 (file)
@@ -120,6 +120,10 @@ import System.IO.Unsafe            ( unsafePerformIO )
 {-# CBITS errno.c #-}
 #endif
 
+#ifdef __NHC__
+import NHC.FFI                 ( CInt(..) )
+#endif
+
 -- "errno" type
 -- ------------
 
index fce4a13..6d7ea1a 100644 (file)
@@ -41,6 +41,7 @@ import Foreign.Ptr
 #ifdef __NHC__
 import NHC.FFI
   ( ForeignPtr
+  , FinalizerPtr
   , newForeignPtr
   , addForeignPtrFinalizer
   , withForeignPtr
@@ -83,6 +84,7 @@ instance Show (ForeignPtr a) where
     showsPrec p f = showsPrec p (foreignPtrToPtr f)
 #endif
 
+
 #ifndef __NHC__
 withForeignPtr :: ForeignPtr a -> (Ptr a -> IO b) -> IO b
 -- ^This is a way to look at the pointer living inside a
index 1b9fe12..3cf7174 100644 (file)
@@ -41,6 +41,7 @@ import GHC.Ptr
 import GHC.Err
 import GHC.Base
 #elif defined(__NHC__)
+import NHC.FFI                 ( FinalizerPtr, CInt(..) )
 import IO                      ( bracket )
 #else
 import Control.Exception       ( bracket )
@@ -50,6 +51,7 @@ import Control.Exception      ( bracket )
 import Hugs.ForeignPtr         ( FinalizerPtr )
 #endif
 
+
 -- exported functions
 -- ------------------
 
index 06528b2..c88fb51 100644 (file)
@@ -53,7 +53,7 @@ module Foreign.Marshal.Utils (
 import Data.Maybe
 import Foreign.Ptr             ( Ptr, nullPtr )
 import Foreign.Storable                ( Storable(poke) )
-import Foreign.C.Types         ( CSize, CInt(..) )
+import Foreign.C.Types         ( CSize )
 import Foreign.Marshal.Alloc   ( malloc, alloca )
 
 #ifdef __GLASGOW_HASKELL__
@@ -63,6 +63,10 @@ import GHC.Num
 import GHC.Base
 #endif
 
+#ifdef __NHC__
+import NHC.FFI                 ( CInt(..) )
+#endif
+
 -- combined allocation and marshalling
 -- -----------------------------------