X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Flib%2Fstd%2FPrelIOBase.lhs;h=8e1971fea4536aee2a939cb883a4e178d20f109a;hb=50027272414438955dbc41696541cbd25da55883;hp=fef341ecb584fc872bf01654a9fdd97bd67d746c;hpb=18ca279fb4f5f9919ab410ac3dd5c620a02e3639;p=ghc-hetmet.git 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