From: sof Date: Wed, 8 Oct 1997 18:14:34 +0000 (+0000) Subject: [project @ 1997-10-08 18:14:23 by sof] X-Git-Tag: Approx_2487_patches~1408 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=5fe86713e62002bf594fd051c97bc239bd4b9987 [project @ 1997-10-08 18:14:23 by sof] Use __PARALLEL_HASKELL__ rather than PAR when -cpp'ing Haskell source --- diff --git a/ghc/lib/ghc/IOBase.lhs b/ghc/lib/ghc/IOBase.lhs index f8e0d72..47015c3 100644 --- a/ghc/lib/ghc/IOBase.lhs +++ b/ghc/lib/ghc/IOBase.lhs @@ -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 diff --git a/ghc/lib/required/IO.lhs b/ghc/lib/required/IO.lhs index 7af7b1c..407e261 100644 --- a/ghc/lib/required/IO.lhs +++ b/ghc/lib/required/IO.lhs @@ -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