62750f71d5c72f31c4bbc6a196118c1693a9613c
[ghc-hetmet.git] / ghc / tests / io / should_run / io011.hs
1 import IO -- 1.3
2
3 import Directory
4 import IOExts (trace)
5
6 main = do
7     createDirectory "foo"
8     h <- openFile "foo/bar" WriteMode
9     hPutStr h "Okay\n"
10     hClose h
11     renameFile "foo/bar" "foo/baz"
12     renameDirectory "foo" "bar"
13     h <- openFile "bar/baz" ReadMode
14     stuff <- hGetContents h
15     putStr stuff
16 --    hClose h  -- an error !
17     removeFile "bar/baz"
18     removeDirectory "bar"