[project @ 2002-10-03 13:29:07 by panne]
[ghc-base.git] / System / IO.hs
index b034132..1226fcc 100644 (file)
@@ -3,14 +3,12 @@
 -- |
 -- Module      :  System.IO
 -- Copyright   :  (c) The University of Glasgow 2001
--- License     :  BSD-style (see the file libraries/core/LICENSE)
+-- License     :  BSD-style (see the file libraries/base/LICENSE)
 -- 
 -- Maintainer  :  libraries@haskell.org
 -- Stability   :  provisional
 -- Portability :  portable
 --
--- $Id: IO.hs,v 1.7 2002/04/24 16:31:45 simonmar Exp $
---
 -- The standard IO library.
 --
 -----------------------------------------------------------------------------
@@ -89,15 +87,19 @@ module System.IO (
     readIO,                   -- :: Read a => String -> IO a
     readLn,                   -- :: Read a => IO a
 
+#ifndef __HUGS__
     hPutBuf,                  -- :: Handle -> Ptr a -> Int -> IO ()
     hGetBuf,                  -- :: Handle -> Ptr a -> Int -> IO Int
+#endif
  
     fixIO,                    -- :: (a -> IO a) -> IO a
 
+#ifndef __HUGS__
     hSetEcho,                  -- :: Handle -> Bool -> IO ()
     hGetEcho,                  -- :: Handle -> IO Bool
 
     hIsTerminalDevice,         -- :: Handle -> IO Bool
+#endif
   ) where
 
 #ifdef __GLASGOW_HASKELL__
@@ -112,11 +114,17 @@ import GHC.Read
 import GHC.Show
 #endif
 
+#ifdef __HUGS__
+import Hugs.IO
+import Hugs.IOExts
+#endif
+
 import System.IO.Error
 
 -- -----------------------------------------------------------------------------
 -- Standard IO
 
+#ifndef __HUGS__
 putChar         :: Char -> IO ()
 putChar c       =  hPutChar stdout c
 
@@ -171,6 +179,7 @@ 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__ */
 
 hReady         :: Handle -> IO Bool
 hReady h       =  hWaitForInput h 0