From c43effe6f556360fe65ea86ef6e805a84f62de3c Mon Sep 17 00:00:00 2001 From: sof Date: Sun, 18 May 1997 04:13:11 +0000 Subject: [PATCH] [project @ 1997-05-18 04:13:11 by sof] Added Addr and Word defns --- ghc/lib/glaExts/Foreign.lhs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/ghc/lib/glaExts/Foreign.lhs b/ghc/lib/glaExts/Foreign.lhs index 81abc4f..9ae5d2a 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# -- 1.7.10.4