projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add stage2/ghci to ghc-api's import list.
[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"