From: simonm Date: Mon, 19 Jan 1998 13:17:15 +0000 (+0000) Subject: [project @ 1998-01-19 13:17:04 by simonm] X-Git-Tag: Approx_2487_patches~1087 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=c264a969e3a46a2cfef86e29d0c1a524b5c1dcd7;p=ghc-hetmet.git [project @ 1998-01-19 13:17:04 by simonm] IO.isUserError returns Bool in Haskell 1.4, not Maybe. --- diff --git a/ghc/lib/ghc/IOBase.lhs b/ghc/lib/ghc/IOBase.lhs index 807dba2..b9a9fca 100644 --- a/ghc/lib/ghc/IOBase.lhs +++ b/ghc/lib/ghc/IOBase.lhs @@ -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 diff --git a/ghc/lib/required/IO.lhs b/ghc/lib/required/IO.lhs index ef97220..8e74a02 100644 --- a/ghc/lib/required/IO.lhs +++ b/ghc/lib/required/IO.lhs @@ -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}