···1010 fields
11111212let parse text =
1313- match Toml.of_string Toml.value text with
1313+ match Toml.of_string Toml.Value.codec text with
1414 | Error _ -> empty
1515 | Ok (Toml.Value.Table (fields, _)) -> (
1616 match assoc_unmeta "allow" fields with
+3-3
lib/toml/irmin_toml.ml
···88 top so we can re-parse it as a stand-alone document. *)
99let enc (v : Toml.Value.t) : string =
1010 match v with
1111- | Toml.Value.Table _ -> Toml.to_string Toml.value v
1111+ | Toml.Value.Table _ -> Toml.to_string Toml.Value.codec v
1212 | _ ->
1313 (* Scalars and arrays need to be wrapped; use a dummy key. *)
1414 let wrapped = Toml.Value.Table ([ (("_", meta), v) ], meta) in
1515- Toml.to_string Toml.value wrapped
1515+ Toml.to_string Toml.Value.codec wrapped
16161717let dec (s : string) : Toml.Value.t =
1818- match Toml.of_string Toml.value s with
1818+ match Toml.of_string Toml.Value.codec s with
1919 | Ok (Toml.Value.Table ([ ((_, _), v) ], _)) -> v
2020 | Ok v -> v
2121 | Error _ -> Toml.Value.Table ([], meta)