haskell-capnp
haskell-capnp copied to clipboard
Correctly read struct lists encoded as non-composite lists.
Per the encoding spec, it is permitted for a non-composite list (whose elements are at least one byte in size) to be decoded as a list of structs. We currently don't handle this, treating such cases as a SchemaViolationError, and I'm intentionally deferring this, but I wanted to record the limitation.
Just a note, most implementations deal with this by having an in-memory "struct" type, i.e. what corresponds to Capnp.Untyped.Struct, whose data-section size is in units of bytes, rather than words. We should follow suit, which will make this easy to add.