[project @ 2002-05-09 13:16:29 by simonmar]
[ghc-base.git] / System / IO / Error.hs
index 22becfb..245487a 100644 (file)
@@ -1,17 +1,15 @@
 {-# OPTIONS -fno-implicit-prelude #-}
 
 -----------------------------------------------------------------------------
--- 
+-- |
 -- Module      :  System.IO.Error
 -- 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: Error.hs,v 1.1 2002/02/05 17:32:27 simonmar Exp $
---
 -- Standard IO Errors.
 --
 -----------------------------------------------------------------------------
@@ -117,6 +115,10 @@ userErrorType                = UserError
 -- -----------------------------------------------------------------------------
 -- IOErrorType predicates
 
+isAlreadyExistsErrorType, isDoesNotExistErrorType, isAlreadyInUseErrorType,
+  isFullErrorType, isEOFErrorType, isIllegalOperationErrorType, 
+  isPermissionErrorType, isUserErrorType :: IOErrorType -> Bool
+
 #ifdef __GLASGOW_HASKELL__
 isAlreadyExistsErrorType AlreadyExists = True
 isAlreadyExistsErrorType _ = False
@@ -148,12 +150,12 @@ isUserErrorType _ = False
 
 #ifdef __GLASGOW_HASKELL__
 ioeGetErrorType              :: IOError -> IOErrorType
-ioeGetFileName        :: IOError -> Maybe FilePath
-ioeGetErrorString     :: IOError -> String
 ioeGetHandle          :: IOError -> Maybe Handle
+ioeGetErrorString     :: IOError -> String
+ioeGetFileName        :: IOError -> Maybe FilePath
 
 ioeGetErrorType (IOException ioe) = ioe_type ioe
-ioeGetHandle _ = error "System.IO.Error.ioeGetHandle: not an IO error"
+ioeGetErrorType _ = error "System.IO.Error.ioeGetHandle: not an IO error"
 
 ioeGetHandle (IOException ioe) = ioe_handle ioe
 ioeGetHandle _ = error "System.IO.Error.ioeGetHandle: not an IO error"