[project @ 1997-10-08 18:14:23 by sof]
authorsof <unknown>
Wed, 8 Oct 1997 18:14:34 +0000 (18:14 +0000)
committersof <unknown>
Wed, 8 Oct 1997 18:14:34 +0000 (18:14 +0000)
Use __PARALLEL_HASKELL__ rather than PAR when -cpp'ing Haskell source

ghc/lib/ghc/IOBase.lhs
ghc/lib/required/IO.lhs

index f8e0d72..47015c3 100644 (file)
@@ -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
index 7af7b1c..407e261 100644 (file)
@@ -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