06d8d9681998100f1d75100ce355b6f9f51d66ac
[packages/haskell2010.git] / System / IO / Error.hs
1 module System.IO.Error (
2 -- * I\/O errors
3 IOError, -- = IOException
4
5 userError, -- :: String -> IOError
6
7 mkIOError, -- :: IOErrorType -> String -> Maybe Handle
8 -- -> Maybe FilePath -> IOError
9
10 annotateIOError, -- :: IOError -> String -> Maybe Handle
11 -- -> Maybe FilePath -> IOError
12
13 -- ** Classifying I\/O errors
14 isAlreadyExistsError, -- :: IOError -> Bool
15 isDoesNotExistError,
16 isAlreadyInUseError,
17 isFullError,
18 isEOFError,
19 isIllegalOperation,
20 isPermissionError,
21 isUserError,
22
23 -- ** Attributes of I\/O errors
24 ioeGetErrorString, -- :: IOError -> String
25 ioeGetHandle, -- :: IOError -> Maybe Handle
26 ioeGetFileName, -- :: IOError -> Maybe FilePath
27
28 -- * Types of I\/O error
29 IOErrorType, -- abstract
30
31 alreadyExistsErrorType, -- :: IOErrorType
32 doesNotExistErrorType,
33 alreadyInUseErrorType,
34 fullErrorType,
35 eofErrorType,
36 illegalOperationErrorType,
37 permissionErrorType,
38 userErrorType
39 ) where
40
41 import "base" System.IO.Error hiding (IOError)
42 import qualified "base" System.IO.Error as Base
43 import Prelude hiding (IOError)
44
45 -- | Errors of type 'IOError' are used by the 'IO' monad. This is an
46 -- abstract type; the module "System.IO.Error" provides functions to
47 -- interrogate and construct values of type 'IOError'.
48 type IOError = Base.IOError