X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=System%2FIO.hs;h=b47bb4266698d1e8b80e6d9248df3023d4d80b1f;hb=8449ae9350867e2f18cb70f765fdea842ce61542;hp=9b5d456c795a2f9aab372bf59dcf05b8e12b675f;hpb=353e92f3080be0bac9bd740b144c59ce67ea4a7f;p=haskell-directory.git diff --git a/System/IO.hs b/System/IO.hs index 9b5d456..b47bb42 100644 --- a/System/IO.hs +++ b/System/IO.hs @@ -57,9 +57,12 @@ module System.IO ( -- * Operations on handles - -- ** Determining the size of a file + -- ** Determining and changing the size of a file hFileSize, -- :: Handle -> IO Integer +#ifdef __GLASGOW_HASKELL__ + hSetFileSize, -- :: Handle -> Integer -> IO () +#endif -- ** Detecting the end of input @@ -201,6 +204,9 @@ import IO , hGetContents -- :: Handle -> IO [Char] , hPutChar -- :: Handle -> Char -> IO () , hPutStr -- :: Handle -> [Char] -> IO () + , hPutStrLn -- :: Handle -> [Char] -> IO () + , hPrint -- :: Handle -> [Char] -> IO () + , hReady -- :: Handle -> [Char] -> IO () , hIsOpen, hIsClosed -- :: Handle -> IO Bool , hIsReadable, hIsWritable -- :: Handle -> IO Bool , hIsSeekable -- :: Handle -> IO Bool @@ -233,7 +239,7 @@ import System.IO.Error ( -- ----------------------------------------------------------------------------- -- Standard IO -#ifndef __HUGS__ +#ifdef __GLASGOW_HASKELL__ -- | Write a character to the standard output device -- (same as 'hPutChar' 'stdout'). @@ -342,8 +348,9 @@ readIO s = case (do { (x,t) <- reads s ; [x] -> return x [] -> ioError (userError "Prelude.readIO: no parse") _ -> ioError (userError "Prelude.readIO: ambiguous parse") -#endif /* __HUGS__ */ +#endif /* __GLASGOW_HASKELL__ */ +#ifndef __NHC__ -- | Computation 'hReady' @hdl@ indicates whether at least one item is -- available for input from handle @hdl@. -- @@ -373,6 +380,7 @@ hPutStrLn hndl str = do hPrint :: Show a => Handle -> a -> IO () hPrint hdl = hPutStrLn hdl . show +#endif /* !__NHC__ */ -- --------------------------------------------------------------------------- -- fixIO