projects
/
haskell-directory.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2002-04-24 16:31:37 by simonmar]
[haskell-directory.git]
/
GHC
/
IOBase.lhs
diff --git
a/GHC/IOBase.lhs
b/GHC/IOBase.lhs
index
6ef6b06
..
e1b8ec3
100644
(file)
--- a/
GHC/IOBase.lhs
+++ b/
GHC/IOBase.lhs
@@
-1,5
+1,5
@@
% ------------------------------------------------------------------------------
% ------------------------------------------------------------------------------
-% $Id: IOBase.lhs,v 1.7 2002/03/14 12:09:50 simonmar Exp $
+% $Id: IOBase.lhs,v 1.8 2002/04/11 12:03:44 simonpj Exp $
%
% (c) The University of Glasgow, 1994-2001
%
%
% (c) The University of Glasgow, 1994-2001
%
@@
-78,6
+78,12
@@
bindIO (IO m) k = IO ( \ s ->
(# new_s, a #) -> unIO (k a) new_s
)
(# new_s, a #) -> unIO (k a) new_s
)
+thenIO :: IO a -> IO b -> IO b
+thenIO (IO m) k = IO ( \ s ->
+ case m s of
+ (# new_s, a #) -> unIO k new_s
+ )
+
returnIO :: a -> IO a
returnIO x = IO (\ s -> (# s, x #))
returnIO :: a -> IO a
returnIO x = IO (\ s -> (# s, x #))