Use __PARALLEL_HASKELL__ rather than PAR when -cpp'ing Haskell source
data Handle__
= ErrorHandle IOError
| ClosedHandle
data Handle__
= ErrorHandle IOError
| ClosedHandle
+#ifndef __PARALLEL_HASKELL__
| SemiClosedHandle ForeignObj (Addr, Int)
| ReadHandle ForeignObj (Maybe BufferMode) Bool
| WriteHandle ForeignObj (Maybe BufferMode) Bool
| SemiClosedHandle ForeignObj (Addr, Int)
| ReadHandle ForeignObj (Maybe BufferMode) Bool
| WriteHandle ForeignObj (Maybe BufferMode) Bool
if bytes < 0 then
_ccall_ free buf >>= \ () ->
_ccall_ closeFile fp >>
if bytes < 0 then
_ccall_ free buf >>= \ () ->
_ccall_ closeFile fp >>
+#ifndef __PARALLEL_HASKELL__
writeForeignObj fp ``NULL'' >>
ioToST (writeHandle handle (SemiClosedHandle fp (``NULL'', 0))) >>
#else
writeForeignObj fp ``NULL'' >>
ioToST (writeHandle handle (SemiClosedHandle fp (``NULL'', 0))) >>
#else
if bytes < 0 then
_ccall_ free buf >>= \ () ->
_ccall_ closeFile fp >>
if bytes < 0 then
_ccall_ free buf >>= \ () ->
_ccall_ closeFile fp >>
+#ifndef __PARALLEL_HASKELL__
writeForeignObj fp ``NULL'' >>
ioToST (writeHandle handle (SemiClosedHandle fp (``NULL'', 0))) >>
#else
writeForeignObj fp ``NULL'' >>
ioToST (writeHandle handle (SemiClosedHandle fp (``NULL'', 0))) >>
#else
_ccall_ readChar fp >>= \ char ->
if char == ``EOF'' then
_ccall_ closeFile fp >>
_ccall_ readChar fp >>= \ char ->
if char == ``EOF'' then
_ccall_ closeFile fp >>
+#ifndef __PARALLEL_HASKELL__
writeForeignObj fp ``NULL'' >>
ioToST (writeHandle handle (SemiClosedHandle fp (``NULL'', 0))) >>
#else
writeForeignObj fp ``NULL'' >>
ioToST (writeHandle handle (SemiClosedHandle fp (``NULL'', 0))) >>
#else
else
constructErrorAndFail "hPutStr"
where
else
constructErrorAndFail "hPutStr"
where
+#ifndef __PARALLEL_HASKELL__
writeLines :: ForeignObj -> String -> PrimIO Bool
#else
writeLines :: Addr -> String -> PrimIO Bool
#endif
writeLines = writeChunks ``BUFSIZ'' True
writeLines :: ForeignObj -> String -> PrimIO Bool
#else
writeLines :: Addr -> String -> PrimIO Bool
#endif
writeLines = writeChunks ``BUFSIZ'' True
+#ifndef __PARALLEL_HASKELL__
writeBlocks :: ForeignObj -> Int -> String -> PrimIO Bool
#else
writeBlocks :: Addr -> Int -> String -> PrimIO Bool
writeBlocks :: ForeignObj -> Int -> String -> PrimIO Bool
#else
writeBlocks :: Addr -> Int -> String -> PrimIO Bool
a whole lot quicker. -- SOF 3/96
-}
a whole lot quicker. -- SOF 3/96
-}
+#ifndef __PARALLEL_HASKELL__
writeChunks :: Int -> Bool -> ForeignObj -> String -> PrimIO Bool
#else
writeChunks :: Int -> Bool -> Addr -> String -> PrimIO Bool
writeChunks :: Int -> Bool -> ForeignObj -> String -> PrimIO Bool
#else
writeChunks :: Int -> Bool -> Addr -> String -> PrimIO Bool
+#ifndef __PARALLEL_HASKELL__
writeChars :: ForeignObj -> String -> PrimIO Bool
#else
writeChars :: Addr -> String -> PrimIO Bool
writeChars :: ForeignObj -> String -> PrimIO Bool
#else
writeChars :: Addr -> String -> PrimIO Bool