Schell, Take a look at my Storable instance for SockAddrBTH here: https://github.com/the-real-blackh/simple-bluetooth/blob/master/Network/Blue... Using .hsc files gives you get the offset into the structure like this: p `plusPtr` (#const offsetof(struct sockaddr_rc, rc_bdaddr)) #include <stddef.h> to give you offsetof. Quite a useful trick. Steve On 04/01/14 08:41, Schell Scivally wrote:
I'm having a hard time unmarshalling a c struct into a haskell record. Does anyone have a good link that talks about unmarshalling nested c structs? Is this common or should I just forget about it?
-- Schell Scivally http://blog.efnx.com http://github.com/schell http://twitter.com/schellsan
_______________________________________________ iPhone mailing list iPhone@haskell.org http://www.haskell.org/mailman/listinfo/iphone