blob: bb37915e1901126ecd6b8665bc5c912662b03885 (
plain)
1
2
3
4
5
6
7
8
9
|
module Main where
import Foreign.Marshal.Alloc
import System.IO
main = do
h <- openBinaryFile "4895.hs" ReadMode
allocaBytes 10 $ \ptr -> hGetBuf h ptr 10
some <- allocaBytes 10 $ \ptr -> hGetBufSome h ptr 10
print some
|