projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git]
/
ghc
/
misc
/
examples
/
io
/
io011
/
Main.hs
1
import LibDirectory
2
3
main =
4
createDirectory "foo" >>
5
openFile "foo/bar" WriteMode >>= \ h ->
6
hPutStr h "Okay\n" >>
7
hClose h >>
8
renameFile "foo/bar" "foo/baz" >>
9
renameDirectory "foo" "bar" >>
10
openFile "bar/baz" ReadMode >>= \ h ->
11
hGetContents h >>= \ stuff ->
12
putStr stuff >>
13
hClose h >>
14
removeFile "bar/baz" >>
15
removeDirectory "bar"