[project @ 1996-07-26 20:58:52 by partain]
[ghc-hetmet.git] / ghc / misc / examples / io / io006 / Main.hs
index c6fc539..6eb862c 100644 (file)
@@ -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"