Add stage2/ghci to ghc-api's import list.
[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"