projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
de3714002f2945b2aa923c9dcc64971c4a97206c
[ghc-hetmet.git]
/
ghc
/
tests
/
io
/
should_run
/
io013.hs
1
-- !!! Test seeking
2
3
import IO
4
5
main = do
6
h <- openFile "io013.in" ReadMode
7
sz <- hFileSize h
8
print sz
9
hSeek h SeekFromEnd (-3)
10
x <- hGetChar h
11
putStr (x:"\n")
12
hSeek h RelativeSeek (-2)
13
w <- hGetChar h
14
putStr (w:"\n")
15
True <- hIsSeekable h
16
hClose h
17