[project @ 1997-05-18 04:13:11 by sof]
authorsof <unknown>
Sun, 18 May 1997 04:13:11 +0000 (04:13 +0000)
committersof <unknown>
Sun, 18 May 1997 04:13:11 +0000 (04:13 +0000)
Added Addr and Word defns

ghc/lib/glaExts/Foreign.lhs

index 81abc4f..9ae5d2a 100644 (file)
 module Foreign (
        module Foreign,
        ForeignObj(..),
-       Addr, Word
+       Addr(..), Word(..)
    ) where
 
 import STBase
-import ArrBase
+-- import ArrBase
 import PrelBase
 import GHC
 \end{code}
@@ -49,21 +49,18 @@ instance CCallable   Double
 instance CCallable   Double#
 instance CReturnable Double
 
+data Addr = A# Addr#   deriving (Eq, Ord) -- Glasgow extension
+
 instance CCallable Addr
 instance CCallable Addr#
 instance CReturnable Addr
 
+data Word = W# Word#   deriving (Eq, Ord) -- Glasgow extension
+
 instance CCallable Word
 instance CCallable Word#
 instance CReturnable Word
 
--- Is this right?
-instance CCallable (MutableByteArray s ix)
-instance CCallable (MutableByteArray# s)
-
-instance CCallable (ByteArray ix)
-instance CCallable ByteArray#
-
 instance CReturnable () -- Why, exactly?
 \end{code}
 
@@ -76,6 +73,8 @@ instance CReturnable () -- Why, exactly?
 
 \begin{code}
 --Defined in PrelBase: data ForeignObj = ForeignObj ForeignObj#
+data ForeignObj = ForeignObj ForeignObj#   -- another one
+
 instance CCallable ForeignObj
 instance CCallable ForeignObj#