Skip to content
Snippets Groups Projects
Commit 5fe86713 authored by sof's avatar sof
Browse files

[project @ 1997-10-08 18:14:23 by sof]

Use __PARALLEL_HASKELL__ rather than PAR when -cpp'ing Haskell source
parent e3122c9e
No related merge requests found
......@@ -396,7 +396,7 @@ type Handle = MutableVar RealWorld Handle__
data Handle__
= ErrorHandle IOError
| ClosedHandle
#ifndef PAR
#ifndef __PARALLEL_HASKELL__
| SemiClosedHandle ForeignObj (Addr, Int)
| ReadHandle ForeignObj (Maybe BufferMode) Bool
| WriteHandle ForeignObj (Maybe BufferMode) Bool
......
......@@ -343,7 +343,7 @@ lazyReadBlock handle =
if bytes < 0 then
_ccall_ free buf >>= \ () ->
_ccall_ closeFile fp >>
#ifndef PAR
#ifndef __PARALLEL_HASKELL__
writeForeignObj fp ``NULL'' >>
ioToST (writeHandle handle (SemiClosedHandle fp (``NULL'', 0))) >>
#else
......@@ -371,7 +371,7 @@ lazyReadLine handle =
if bytes < 0 then
_ccall_ free buf >>= \ () ->
_ccall_ closeFile fp >>
#ifndef PAR
#ifndef __PARALLEL_HASKELL__
writeForeignObj fp ``NULL'' >>
ioToST (writeHandle handle (SemiClosedHandle fp (``NULL'', 0))) >>
#else
......@@ -395,7 +395,7 @@ lazyReadChar handle =
_ccall_ readChar fp >>= \ char ->
if char == ``EOF'' then
_ccall_ closeFile fp >>
#ifndef PAR
#ifndef __PARALLEL_HASKELL__
writeForeignObj fp ``NULL'' >>
ioToST (writeHandle handle (SemiClosedHandle fp (``NULL'', 0))) >>
#else
......@@ -498,14 +498,14 @@ hPutStr handle str =
else
constructErrorAndFail "hPutStr"
where
#ifndef PAR
#ifndef __PARALLEL_HASKELL__
writeLines :: ForeignObj -> String -> PrimIO Bool
#else
writeLines :: Addr -> String -> PrimIO Bool
#endif
writeLines = writeChunks ``BUFSIZ'' True
#ifndef PAR
#ifndef __PARALLEL_HASKELL__
writeBlocks :: ForeignObj -> Int -> String -> PrimIO Bool
#else
writeBlocks :: Addr -> Int -> String -> PrimIO Bool
......@@ -524,7 +524,7 @@ hPutStr handle str =
a whole lot quicker. -- SOF 3/96
-}
#ifndef PAR
#ifndef __PARALLEL_HASKELL__
writeChunks :: Int -> Bool -> ForeignObj -> String -> PrimIO Bool
#else
writeChunks :: Int -> Bool -> Addr -> String -> PrimIO Bool
......@@ -562,7 +562,7 @@ hPutStr handle str =
in
shoveString 0# s
#ifndef PAR
#ifndef __PARALLEL_HASKELL__
writeChars :: ForeignObj -> String -> PrimIO Bool
#else
writeChars :: Addr -> String -> PrimIO Bool
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment