[project @ 1998-01-19 13:17:04 by simonm]
authorsimonm <unknown>
Mon, 19 Jan 1998 13:17:15 +0000 (13:17 +0000)
committersimonm <unknown>
Mon, 19 Jan 1998 13:17:15 +0000 (13:17 +0000)
IO.isUserError returns Bool in Haskell 1.4, not Maybe.

ghc/lib/ghc/IOBase.lhs
ghc/lib/required/IO.lhs

index 807dba2..b9a9fca 100644 (file)
@@ -186,8 +186,8 @@ isPermissionError _                          = False
 isDoesNotExistError (IOError _ NoSuchThing _) = True
 isDoesNotExistError _                         = False
 
-isUserError (IOError _ UserError s) = Just s
-isUserError _                      = Nothing
+isUserError (IOError _ UserError _) = True
+isUserError _                      = False
 \end{code}
 
 Showing @IOError@s
index ef97220..8e74a02 100644 (file)
@@ -94,7 +94,7 @@ hWaitForInput         :: Handle -> Int -> IO Bool
 -- isFullError           :: IOError -> Bool
 -- isIllegalOperation    :: IOError -> Bool
 -- isPermissionError     :: IOError -> Bool
--- isUserError           :: IOError -> Maybe String
+-- isUserError           :: IOError -> Bool
 --IOHandle:openFile              :: FilePath -> IOMode -> IO Handle
 --IOHandle:stdin, stdout, stderr :: Handle
 \end{code}