X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=System%2FIO.hs;h=5fd8ac50d864cba55d7856e3c2c57618ad54090b;hb=638e07f4e7b806768e688ebfedb1e0dcb3d6a70c;hp=729806f4ac7d6c237ea86a0d78fb3f2edbf3b2e8;hpb=7bce4ee1aa0287c9885647dfcf9de5072492a3fb;p=ghc-base.git diff --git a/System/IO.hs b/System/IO.hs index 729806f..5fd8ac5 100644 --- a/System/IO.hs +++ b/System/IO.hs @@ -1,4 +1,4 @@ -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS_GHC -fno-implicit-prelude #-} ----------------------------------------------------------------------------- -- | -- Module : System.IO @@ -161,8 +161,6 @@ module System.IO ( openTempFile, openBinaryTempFile, #endif - - module System.IO.Error, ) where #ifdef __GLASGOW_HASKELL__ @@ -170,7 +168,6 @@ import GHC.Base import GHC.IOBase -- Together these four Prelude modules define import GHC.Handle -- all the stuff exported by IO for the GHC version import GHC.IO -import GHC.ST ( fixST ) import GHC.Exception import GHC.Num import GHC.Read @@ -224,25 +221,6 @@ import IO import NHC.IOExtras (fixIO) #endif -import System.IO.Error ( - isAlreadyExistsError, isDoesNotExistError, -- :: IOError -> Bool - isAlreadyInUseError, isFullError, - isEOFError, isIllegalOperation, - isPermissionError, isUserError, - - ioeGetErrorString, -- :: IOError -> String - ioeGetHandle, -- :: IOError -> Maybe Handle - ioeGetFileName, -- :: IOError -> Maybe FilePath - - try, -- :: IO a -> IO (Either IOError a) - - -- re-exports of Prelude names - IOError, - ioError, -- :: IOError -> IO a - userError, -- :: String -> IOError - catch -- :: IO a -> (IOError -> IO a) -> IO a - ) - -- ----------------------------------------------------------------------------- -- Standard IO @@ -363,7 +341,7 @@ readIO s = case (do { (x,t) <- reads s ; -- -- This operation may fail with: -- --- * 'isEOFError' if the end of file has been reached. +-- * 'System.IO.Error.isEOFError' if the end of file has been reached. hReady :: Handle -> IO Bool hReady h = hWaitForInput h 0 @@ -381,9 +359,9 @@ hPutStrLn hndl str = do -- -- This operation may fail with: -- --- * 'isFullError' if the device is full; or +-- * 'System.IO.Error.isFullError' if the device is full; or -- --- * 'isPermissionError' if another system resource limit would be exceeded. +-- * 'System.IO.Error.isPermissionError' if another system resource limit would be exceeded. hPrint :: Show a => Handle -> a -> IO () hPrint hdl = hPutStrLn hdl . show @@ -429,4 +407,4 @@ hSetBinaryMode _ _ = return () -- the file until the entire contents of the file have been consumed. -- It follows that an attempt to write to a file (using 'writeFile', for -- example) that was earlier opened by 'readFile' will usually result in --- failure with 'isAlreadyInUseError'. +-- failure with 'System.IO.Error.isAlreadyInUseError'.