Re: raw data access

2006-05-01 Thread John Meacham
On Tue, May 02, 2006 at 12:57:17AM +0200, Johan Henriksson wrote: > toBinary :: a -> [Int] -- pack data as a string of bytes > fromBinary :: [Int] -> a -- unpack > binarySize :: a -> Maybe Int > -- number of bytes for this type or Nothing if not fixed > > the packing would be compiler dependent s

raw data access

2006-05-01 Thread Johan Henriksson
this is just an idea, that came out from some discussion on #haskell. if one would want to use an external fast library for storing data (using FFI), one would need some sort of marshalling. this is inconvenient as to my knowledge one would have to add new code for each type, correct me if I'm wro