[project @ 1997-10-21 20:33:36 by sof]
authorsof <unknown>
Tue, 21 Oct 1997 20:35:06 +0000 (20:35 +0000)
committersof <unknown>
Tue, 21 Oct 1997 20:35:06 +0000 (20:35 +0000)
Avoid exposing ForeignObjs when compiling Parallel Haskell

ghc/lib/ghc/PackBase.lhs
ghc/lib/required/IO.lhs

index 1388329..3e69348 100644 (file)
@@ -34,10 +34,12 @@ module PackBase
        unpackCStringBA#,  -- :: ByteArray#    -> Int# -> [Char]
        unpackNBytesBA#,   -- :: ByteArray#    -> Int# -> [Char]
 
+#ifndef __PARALLEL_HASKELL__
        unpackCStringFO,   -- :: ForeignObj    -> [Char]
        unpackNBytesFO,    -- :: ForeignObj    -> Int  -> [Char]
        unpackCStringFO#,  -- :: ForeignObj#   -> [Char]
        unpackNBytesFO#,   -- :: ForeignObj#   -> Int# -> [Char]
+#endif
 
        unpackFoldrCString#,  -- **
        unpackAppendCString#  -- **
@@ -121,6 +123,7 @@ sequence of bytes into a list of @Char@s (a renamed version
 of the code above).
 
 \begin{code}
+#ifndef __PARALLEL_HASKELL__
 unpackCStringFO :: ForeignObj -> [Char]
 unpackCStringFO (ForeignObj fo#) = unpackCStringFO# fo#
 
@@ -147,6 +150,7 @@ unpackNBytesFO# fo len
       | otherwise  = C# ch : unpack (i +# 1#)
       where
        ch = indexCharOffForeignObj# fo i
+#endif
 \end{code}
 
 
index 87b4116..25767d5 100644 (file)
@@ -41,7 +41,12 @@ import IOHandle              -- much of the real stuff is in here
 import PackBase                ( unpackNBytesST )
 import PrelBase
 import GHC
-import Foreign          ( ForeignObj, Addr, makeForeignObj, writeForeignObj )
+import Foreign  ( Addr, 
+#ifndef __PARALLEL_HASKELL__
+                  ForeignObj, makeForeignObj, writeForeignObj 
+#endif
+                 )
+
 import Char            ( ord, chr )
 \end{code}