irmin: codec-based schema with MIME names, Type.Id, and typed fields
Replace the GADT-shaped schema with a record-based codec carrying a
MIME-style name and a Type.Id witness. This unifies "schema" and
"content type" into one concept, modelled after IPLD codecs and HTTP
content negotiation.
API changes:
- 'a t now means "codec for blocks of value type 'a"
- node ~name ~dec ~enc ?merge ?rules () : children t
- opaque : H.block t (leaf, no navigation)
- map ~dec ~enc inner : transforms value type, keeps navigation
- fix : ('a t -> 'a t) -> 'a t (recursion)
- name, id (Type.Id witness) for runtime introspection
- ('a, 'b) field: typed accessor (path + expected codec)
- step (typed): cursor -> field -> 'b cursor option
- step_any (untyped): returns Step (codec, cursor) existential
- cast: recover typed cursor via Type.Id equality
- Step constructor now carries (codec, cursor) for type recovery
- step_result type renamed (was step) to avoid clash with val step
All backends declare a MIME name like "application/json",
"application/x-git-tree", "application/dag-cbor".
11 tests pass (6 schema + 5 tar), mst_proof verified.