[project @ 2005-01-11 16:04:08 by simonmar]
[ghc-base.git] / GHC / IO.hs
index 27b59f1..9959914 100644 (file)
--- a/GHC/IO.hs
+++ b/GHC/IO.hs
@@ -1,4 +1,4 @@
-{-# OPTIONS -fno-implicit-prelude -#include "HsBase.h" #-}
+{-# OPTIONS_GHC -fno-implicit-prelude -#include "HsBase.h" #-}
 
 #undef DEBUG_DUMP
 
@@ -27,7 +27,7 @@ module GHC.IO (
    memcpy_baoff_ptr,
  ) where
 
-#include "config.h"
+#include "ghcconfig.h"
 
 import Foreign
 import Foreign.C
@@ -93,7 +93,7 @@ hWaitForInput h msecs = do
                           (fromIntegral msecs) (haIsStream handle_)
                return (r /= 0)
 
-foreign import ccall unsafe "inputReady"
+foreign import ccall safe "inputReady"
   inputReady :: CInt -> CInt -> Bool -> IO CInt
 
 -- ---------------------------------------------------------------------------
@@ -410,7 +410,7 @@ hPutChar handle c =
        LineBuffering    -> hPutcBuffered handle_ True  c
        BlockBuffering _ -> hPutcBuffered handle_ False c
        NoBuffering      ->
-               withObject (castCharToCChar c) $ \buf -> do
+               with (castCharToCChar c) $ \buf -> do
                  writeRawBufferPtr "hPutChar" (fromIntegral fd) (haIsStream handle_) buf 0 1
                  return ()