projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
798c154a668dc575f43164d6a025cf77cdf65d4f
[ghc-hetmet.git]
/
ghc
/
tests
/
io
/
should_run
/
io031.hs
1
-- !!! RW files
2
module Main(main) where
3
4
import IO
5
import Directory ( removeFile )
6
7
main = do
8
hdl <- openFile "io031.inout" ReadWriteMode
9
removeFile "io031.inout"
10
hSetBuffering hdl LineBuffering
11
hPutStr hdl "as"
12
hSeek hdl AbsoluteSeek 0
13
ch <- hGetChar hdl
14
print ch
15
hPutStr hdl "ase"
16
hSeek hdl AbsoluteSeek 0
17
putChar '\n'
18
ls <- hGetContents hdl
19
putStrLn ls
20