summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ghc/lib/glaExts/Foreign.lhs17
1 files changed, 8 insertions, 9 deletions
diff --git a/ghc/lib/glaExts/Foreign.lhs b/ghc/lib/glaExts/Foreign.lhs
index 81abc4f13d..9ae5d2afd5 100644
--- a/ghc/lib/glaExts/Foreign.lhs
+++ b/ghc/lib/glaExts/Foreign.lhs
@@ -10,11 +10,11 @@
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#