- get_col → col, find_col → col_index (redundant prefixes) - Add pp : 'a t Fmt.t for the main codec type - Add doc comments to fuzz/test .mli files - Fix nullable_float/nullable_int doc format
···11+(** Fuzz tests for CSV codecs. *)
22+13val suite : string * Alcobar.test_case list
44+(** [suite] is the fuzz test suite. *)
+9
lib/csvt.ml
···9797 | Dec_fun f -> f
9898 | Dec_app (f, arg) -> (apply_dict f dict) (Option.get (Dict.find arg dict))
9999100100+let rec pp : type a. a t Fmt.t =
101101+ fun ppf t ->
102102+ match t with
103103+ | String _ -> Fmt.string ppf "field"
104104+ | Map m -> pp ppf m.dom
105105+ | Obj m ->
106106+ let names = List.map (fun (Mem_dec mm) -> mm.name) m.mem_decs in
107107+ Fmt.pf ppf "row(%s)" (String.concat ", " names)
108108+100109(* {1 Decode and encode}
101110102111 The CSV equivalents of the paper's [decode] and [encode] functions,
+3
lib/csvt.mli
···5252type 'a t
5353(** The type of CSV codecs mapping CSV data to OCaml values of type ['a]. *)
54545555+val pp : 'a t Fmt.t
5656+(** [pp ppf c] formats the codec kind. *)
5757+5558(** {1:field Field Codecs} *)
56595760val string : string t
+3
test/test_csvt.mli
···11+(** Unit tests for CSV codecs. *)
22+13val suite : string * unit Alcotest.test_case list
44+(** [suite] is the test suite. *)