From c264a969e3a46a2cfef86e29d0c1a524b5c1dcd7 Mon Sep 17 00:00:00 2001
From: simonm <unknown>
Date: Mon, 19 Jan 1998 13:17:15 +0000
Subject: [PATCH] [project @ 1998-01-19 13:17:04 by simonm] IO.isUserError
 returns Bool in Haskell 1.4, not Maybe.

---
 ghc/lib/ghc/IOBase.lhs  | 4 ++--
 ghc/lib/required/IO.lhs | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ghc/lib/ghc/IOBase.lhs b/ghc/lib/ghc/IOBase.lhs
index 807dba22a84a..b9a9fca98041 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 ef97220450bb..8e74a02a3928 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}
-- 
GitLab