projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[project @ 1996-07-26 20:58:52 by partain]
[ghc-hetmet.git]
/
ghc
/
misc
/
examples
/
io
/
io006
/
Main.hs
diff --git
a/ghc/misc/examples/io/io006/Main.hs
b/ghc/misc/examples/io/io006/Main.hs
index
c6fc539
..
6eb862c
100644
(file)
--- a/
ghc/misc/examples/io/io006/Main.hs
+++ b/
ghc/misc/examples/io/io006/Main.hs
@@
-1,4
+1,6
@@
+import IO -- 1.3
+
main =
hClose stderr >>
- hPutStr stderr "junk" `handle` \ (IllegalOperation _) -> putStr "Okay\n"
+ hPutStr stderr "junk" `catch` \ err -> if isIllegalOperation err then putStr "Okay\n" else error "Not okay\n"