However, when we want to update this description, sometimes, we can forget to update description with the encoder or vice-versa and put a bug - specially when we need to produce exactly what we read. So we found a project, finale, which wants to provide a meta-syntax to produce decoder and encoder both. In this way, we can ensure isomorphism between encoder and decoder and it’s exactly what we want for Git.
We took this idea and provide more strictly an angstrom decoder and an internal encoder. Indeed, finale is focus on to pretty-print a value instead to produce exactly a serialized representation of value equal to what we de-serialize.
This library can be used by another encoder/decoder library, however we make this library on top of some constraints about shared behaviors of
angstrom and the internal encoder
lole - specially about alteration.
Finally, this library was produced explicitly for ocaml-git, so we miss may be some convenience functions for the client. So, feel free to improve it!