Skip to content

Latest commit

 

History

History
72 lines (58 loc) · 3.2 KB

TODO.md

File metadata and controls

72 lines (58 loc) · 3.2 KB

binrep to-dos

Discrepancy in generic sum interface

In Get, I require a Getter pt. But in Put/BLen, you have to pass the Putter/BLen manually. I'm not sure which one is correct. Probably Get.

Move Binrep.Type.Text

It's fine, but it's not binrep (module imports appear separate).

Clarify Thin stuff

I use the ByteString instance internally sometimes (probably), and in those cases I want "thin" parsing since I'm consuming it right there and then. I need to clarify the precise setup here.

Assert fast magic handling is safe on either endian

I think we do endian-neutral operations, but do confirm.

Extra primitive types, instances

Test new parser errors

Where we keep track of the offset. It's very weird and probably bad :(

Intermediate types should use the bytestring builder type, not a bytestring

Saves on allocations if you're just gonna serialize. Specifically, the text modules probably want this. Not sure how to do it exactly to retain maximum soundness.

This might be a big change. I need to check aeson's design more thoroughly, it'd look like the Encoding stuff.

2023-02-19: No, actually, I think this is a Text-unique thing, and they just need some extra definitions.

Octet instead of byte?

Is it better to refer to octets instead of bytes? An octet is always 8 bits, while a byte is kind of "not necessarily".

Safety against unknown inputs

Consider implementing "practical maxes" for various types.

May help prevent unexpected OOMs?

Generate (human-readable) schema from type

I think I do this by writing yet another typeclass, filling it out for my primitives, then writing yet another generic typeclass. But I'd like to make this really powerful. Send an a_generic_info -> b function along or something, so we can provide a ton of different schema formats for free. e.g write to plain pretty string, write to a JSON doc, write to some description language...

Actually, I think you send a bunch of functions along. So that's why people use a typeclass instead, for this "no middle man" thing. Should be fun.