Module Talon.Kind
Kinds: the OCaml types that cells read as.
A column's Type.t is what it stores, and its kind is the OCaml type its cells read as. Several types share a kind: int8 through uint64 all read as int. Handles name a kind, never a type, so storage width never appears in user code.
Binding. A handle of kind k binds a column of type t iff provably_equal k (Type.kind t) is Some Equal. An extension column's kind is the extension kind, which no kind is provably equal to, so a handle never binds one: only an extension's declaration reads its cells.
type 'a tThe type for kinds whose cells read as OCaml values of type 'a.
Kinds
Record columns read through Record.kind.
int reads the integer columns, int8 through int64 and uint8 through uint64. A value outside OCaml's int range fails when it is read.
val instant : Time.instant tinstant reads datetime columns of every unit whose clock is UTC (Instants and wall clocks). A value outside the range of Time.instant fails when it is read.
wall reads datetime columns of every unit whose clock is a wall clock (Instants and wall clocks). A value outside the range of Time.wall fails when it is read.
span reads duration and clock columns of every unit. A time of day reads as its span from midnight. A value outside the range of Time.span fails when it is read.
tensor dt reads tensor columns of dtype dt and any cell shape.
Comparing and formatting
provably_equal k0 k1 is Some Equal iff k0 and k1 are the same kind, neither being nor containing the extension kind: lists are equal when their elements are, and tensors when their dtypes are. It is None otherwise, in particular for two extension kinds.
pp ppf k formats k by the name of the value that builds it: bool, int, float, string, binary, date, instant, wall and span. The record kind formats as record and the extension kind as ext. A list kind formats its element kind in brackets, as in list[float], and a tensor kind its dtype, as in tensor[float32].