9 source = "readFile001.hs"
10 filename = "readFile001.out"
14 h <- openFile filename WriteMode
17 s <- readFile filename
19 -- This open should fail, because the readFile hasn't been forced
20 -- and the file is therefore still locked.
21 try (openFile filename WriteMode) >>= print
25 -- should be able to open it for writing now, because we've forced the
27 h <- openFile filename WriteMode
32 {loc=readFile001.out,type=writable,binary=False,buffering=block (8192)}