[Haskell-cafe] Binary file r/w example

Bo Herlin bo at gcab.net
Wed Apr 13 02:52:49 EDT 2005

Hi, does anyone have a small but complete example on how to read a 
(portion of) a binary file, like r/w the header of a Midi-file?

It seems like readBinaryFile (ans writeBinaryFile) is deprecated and I 
should use hGetBuf (and hPutBuf), but what is this Ptr thing?

How would I implement readBinaryFile using hGetBuf?

Bo Herlin

More information about the Haskell-Cafe mailing list