-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
--- Stability : provisional
+-- Stability : stable
-- Portability : portable
--
-- The standard IO library.
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,
, IO ()
, FilePath -- :: String
)
-import NHC.Internal (unsafePerformIO)
+import NHC.IOExtras (fixIO)
#endif
import System.IO.Error (
putStr :: String -> IO ()
putStr s = hPutStr stdout s
--- | The same as 'putStrLn', but adds a newline character.
+-- | The same as 'putStr', but adds a newline character.
putStrLn :: String -> IO ()
putStrLn s = do putStr s
#endif /* __HUGS__ */
-- | Computation 'hReady' @hdl@ indicates whether at least one item is
--- available for input from handle "hdl".
+-- available for input from handle @hdl@.
--
-- This operation may fail with:
--
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