From 42d07019978e59f44e4e07ae5f78d32e60727476 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 27 Feb 2001 13:38:58 +0000 Subject: [PATCH] [project @ 2001-02-27 13:38:58 by simonmar] changes for commandline do-bindings: define failIO. --- ghc/lib/std/PrelIOBase.lhs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc/lib/std/PrelIOBase.lhs b/ghc/lib/std/PrelIOBase.lhs index fef341e..8e1971f 100644 --- a/ghc/lib/std/PrelIOBase.lhs +++ b/ghc/lib/std/PrelIOBase.lhs @@ -1,5 +1,5 @@ % ------------------------------------------------------------------------------ -% $Id: PrelIOBase.lhs,v 1.36 2001/02/27 13:38:15 simonmar Exp $ +% $Id: PrelIOBase.lhs,v 1.37 2001/02/27 13:38:58 simonmar Exp $ % % (c) The University of Glasgow, 1994-2000 % @@ -93,7 +93,10 @@ instance Monad IO where return x = returnIO x m >>= k = bindIO m k - fail s = ioError (userError s) + fail s = failIO s + +failIO :: String -> IO a +failIO s = ioError (userError s) liftIO :: IO a -> State# RealWorld -> STret RealWorld a liftIO (IO m) = \s -> case m s of (# s', r #) -> STret s' r -- 1.7.10.4