[project @ 1996-07-25 21:02:03 by partain]
[nofib.git] / GHC_ONLY / io007 / Main.hs
1 import IO -- 1.3
2
3 main =
4 openFile "io007.in" ReadMode >>= \ hIn ->
5 hPutStr hIn "test" `catch`
6 \ err ->
7 if isIllegalOperation err then
8 hGetContents hIn >>= \ stuff ->
9 hPutStr stdout stuff
10 else
11 error "Oh dear\n"