diff --git a/ghc/lib/ghc/PackBase.lhs b/ghc/lib/ghc/PackBase.lhs index 1388329484830dc020d2555f3b284bf1826f98e0..3e69348920115eac2d3a3f051cfd4be927bc033a 100644 --- a/ghc/lib/ghc/PackBase.lhs +++ b/ghc/lib/ghc/PackBase.lhs @@ -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} diff --git a/ghc/lib/required/IO.lhs b/ghc/lib/required/IO.lhs index 87b4116fa3b12cea8958566c689214ed89302b7a..25767d569d23ba1ebca0c507eaddb420d520f629 100644 --- a/ghc/lib/required/IO.lhs +++ b/ghc/lib/required/IO.lhs @@ -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}