
From: Aaron Gray
On 9 January 2011 21:30, Henning Thielemann wrote: On Sun, 9 Jan 2011, Aaron Gray wrote:
I am trying to work out how to use GHC.Ptr, Foreign.Storable,
Data.Storable.Endian, and am looking for good examples of usage.
What do you intend to do with them?
An (ABC) ActionScript Byte Code backend for Haskell.
Basically I need to write little-endian binary to a file, and was wondering the best way to do this; I need various types including a 24bit type.
You could use my "word24" package[1] (GHC only) to provide non-aligned 24-bit word and int types with Storable instances. You should be able to write a binary instance (or whatever blaze-builder needs) fairly simply from this. Little-endian only ATM, but BE could be added if necessary. John Lato [1] http://hackage.haskell.org/package/word24