9a91886053c58fd3ee4867c46cf265bfef258bc8
[ghc-hetmet.git] / ghc / tests / lib / IO / openFile006.hs
1 -- !!! opening a file in WriteMode better truncate it
2
3 import IO
4
5 main = do
6   h <- openFile "openFile006.out" AppendMode
7   hPutStrLn h "hello, world"
8   size <- hFileSize h
9   print size
10   hClose h
11  
12   h <- openFile "openFile006.out" WriteMode
13   size <- hFileSize h
14   print size