[project @ 2003-11-26 09:55:22 by simonmar]
[ghc-base.git] / System / IO.hs
index 5d0f0a7..f33a167 100644 (file)
@@ -6,7 +6,7 @@
 -- License     :  BSD-style (see the file libraries/base/LICENSE)
 -- 
 -- Maintainer  :  libraries@haskell.org
--- Stability   :  provisional
+-- Stability   :  stable
 -- Portability :  portable
 --
 -- The standard IO library.
@@ -149,6 +149,8 @@ module System.IO (
     hSetBinaryMode,           -- :: Handle -> Bool -> IO ()
     hPutBuf,                  -- :: Handle -> Ptr a -> Int -> IO ()
     hGetBuf,                  -- :: Handle -> Ptr a -> Int -> IO Int
+    hPutBufNonBlocking,               -- :: Handle -> Ptr a -> Int -> IO Int
+    hGetBufNonBlocking,               -- :: Handle -> Ptr a -> Int -> IO Int
 #endif
 
     module System.IO.Error,
@@ -204,7 +206,7 @@ import IO
   , IO ()
   , FilePath                  -- :: String
   )
-import NHC.Internal (unsafePerformIO)
+import NHC.IOExtras (fixIO)
 #endif
 
 import System.IO.Error (
@@ -377,10 +379,6 @@ hPrint hdl         =  hPutStrLn hdl . show
 fixIO          :: (a -> IO a) -> IO a
 fixIO m         = stToIO (fixST (ioToST . m))
 #endif
-#ifdef __NHC__
-fixIO           :: (a -> IO a) -> IO a
-fixIO f         = let x = unsafePerformIO (f x) in return x
-#endif
 
 -- $locking
 -- Implementations should enforce as far as possible, at least locally to the