Module Csv.Atom
A functor to quickly generate a Csvable module using its string conversion functions
Parameters
S : Stringable
Signature
include Csvable_simple
val is_csv_atom : booltrueifcsvablewill be represented as a column, and its label is the field name of a containing record.
val rev_csv_header' : string list -> _ -> _ -> string listA
Fields.foldfriendly version of a function to collect the csv header of thecsvabletype. The output is the header in reverse order.
val rev_csv_header_spec' : Spec.t list -> _ -> _ -> Spec.t listval t_of_row' : _ -> string list -> (unit -> t) * string listt_of_row' _ rowgenerates aFields.make_creatorfriendly function that outputs a pair(creator, tail)such thatcreator ()generates the typetwith the first elements inrow, andtailis the remaining set of elements fromrowthat where not used in the creation oft.
val write_row_of_t' : is_first:bool -> is_last:bool -> writer:(string -> unit) -> _ -> _ -> t -> unitrow_of_t'has the same arguments asHelper.write. The ignored arguments are used to make itFields.foldfriendly.
val csv_header_spec : Spec.t listval t_of_row : string list -> tt_of_row rowcreates typetfrom therow.
val row_of_t : t -> string listrow_of_t tcreates arowfromcsvable.
val csv_load : ?separator:char -> string -> t listThe following functions are wrappers around the corresponding functions in
Csvlib.Csv.
val csv_load_in : ?separator:char -> Core.In_channel.t -> t listval csv_save_fn : ?separator:char -> (string -> unit) -> t list -> unitval csv_save_out : ?separator:char -> Core.Out_channel.t -> t list -> unitval csv_save : ?separator:char -> string -> t list -> unit