projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
467382ff76c3467e4c7d40a008e1a66336c66466
[ghc-hetmet.git]
/
ghc
/
misc
/
examples
/
io
/
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"