2 module Main(main) where
5 import Directory ( removeFile )
8 hFlush stdin `catch` \ _ -> putStrLn "No can do - flushing read-only handles isn't legal"
13 hdl <- openFile "io029.hs" ReadMode
14 hFlush hdl `catch` \ _ -> putStrLn "No can do - flushing read-only handles isn't legal"
16 hdl <- openFile "io029.out" WriteMode
17 removeFile "io029.out"
20 hdl <- openFile "io029.out" AppendMode
21 removeFile "io029.out"
24 hdl <- openFile "io029.out" ReadWriteMode
25 removeFile "io029.out"