
On Monday 10 September 2007 18:21, Thomas Schilling wrote:
On Mon, 2007-09-10 at 18:11 +0200, Sven Panne wrote: [...]
The library looks quite nice, but I'm missing support for reading/writing Int{8,16,32,64}
maybe this?
http://hackage.haskell.org/packages/archive/binary/0.3/doc/html/Data-Binary -Get.html#v%3AgetWord8
Of course I can *implement* everything on top of this, but this is not the point. The binary library should have builtin support for more data types, and this is probably not hard to implement.
Also note that many Haskell standard types are instances of the Binary class. I might have misunderstood what you're asking for, though...
Again a confusion of the 2 things the binary package offers (I was confused initially as well): The Binary class is totally useless for reading/writing existing formats, simply because that's not its task. To read/write an existing format (BMP, MP3, WAV, Quake BSP, etc.) you have to use the getFoo/readFoo functions. So what I was asking for is: getInt32be, putIEEEFloatLe, getIEEEDoubleHost, ... Type classes might be used to get a slightly smaller API, but I am unsure about the performance impact and how much this would really buy us in terms of the ease of use of the API. Cheers, S.