blob: a7ea2eed0355016d80f2dabccf45800c2533fc75 (
plain)
1
2
3
4
5
6
7
8
9
|
import System.IO
import Foreign
import Foreign.C
-- !!! this test failed to write anything in GHC 5.00.2
main = do
h <- openBinaryFile "hPutBuf002.out" ReadWriteMode
withCStringLen "hello world\n" $ \(ptr,len) -> hPutBuf h ptr len
hFileSize h >>= print
|