package biocaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Tags describe the actual format of the row stream. See also Tags.t.

type t = [ `separator of char | `strict_about of [ `row_length | `cell_type ] | `format of t_type ] list

The tags associated with table rows:

  • `separator c adds c in the list of separators used.
  • `strict_about something ensures that the format is fully compliant with something (example: otherwise the parser may ignore some errors to keep going).
  • `tail_format array describes the format of the columns of the row, if not provided everything is assumed to be `type_string.
val separators : t -> char list

Get the list of separators defined in t.

val strict_row_length : t -> bool

Tell whether one should be strict about the minimal number of cells per row (defined with `format _).

val strict_cell_type : t -> bool

Tell whether one should be strict about the types of the cells (defined with `format _).

val format : t -> t_type option

Get the defined format if any.

val default : t

The default tags define a loose TSV format.

val default_extension : t -> string

Give a file extension ("tsv", "csv", or "table").

val to_string : t -> string

Serialize tags.

val of_string : string -> (t, [> `table_row of [> `tags_of_string of exn ] ]) Core.Result.t

Parse the description of the tags (for now S-Expressions).

val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t