rustgen: create intermediate type represenation that can represent, and be reified from encodings equivalent to, Uint8 (and nothing else)
Context
See context of #34
This phase is intended to handle the equivalent first step on the OCaml side, which is the conversion of 'a Data_encoding.t
to an alpha-free intermediate representation, which only needs to handle the case of Uint8 as a prototypical case-study.
Steps
- Implement a concrete (alpha-free) type with two initial variants, named roughly:
AbstractUint8
andNotYetImplemented
- Implement a conversion function that takes an
'a encoding
and produces a value of the above type, decided by what constructor and constraints it pattern-matches against (is, or is not, a uint8) - Write a test suite that constructs various encodings that demonstrate or refute the soundness of the above conversion