projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
97f7d90e58b68eefce3f1da41115619217d422e1
[ghc-hetmet.git]
/
ghc
/
misc
/
examples
/
io
/
io011
/
Main.hs
1
import IO -- 1.3
2
3
import Directory
4
5
main =
6
createDirectory "foo" >>
7
openFile "foo/bar" WriteMode >>= \ h ->
8
hPutStr h "Okay\n" >>
9
hClose h >>
10
renameFile "foo/bar" "foo/baz" >>
11
renameDirectory "foo" "bar" >>
12
openFile "bar/baz" ReadMode >>= \ h ->
13
hGetContents h >>= \ stuff ->
14
putStr stuff >>
15
hClose h >>
16
removeFile "bar/baz" >>
17
removeDirectory "bar"