From 5046defebb8e04d00489a6be070b1b7e7a49ce84 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Tue, 11 Aug 2026 13:00:51 +0200 Subject: kernel(record): flat all-string canonical output view The boundary where rite-parametric types stop. CSV, JSON and the template engine all render from this one schema, so they never see a type variable. headers/to_row cover the scalar columns; names and citations are variable-arity and wait for the richer encoders in Plan 5. --- lib/kernel/record.mli | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lib/kernel/record.mli (limited to 'lib/kernel/record.mli') diff --git a/lib/kernel/record.mli b/lib/kernel/record.mli new file mode 100644 index 0000000..858f125 --- /dev/null +++ b/lib/kernel/record.mli @@ -0,0 +1,23 @@ +(** The canonical flat output view: one row per day, every field a string. This + is the boundary at which rite-parametric types stop. *) +type t = { + date : string; + rite : string; + season : string; + week : string; + weekday : string; + slug : string; + rank : string; + colour : string; + subject : string; + names : (string * string) list; + citations : (string * string) list; +} + +val of_temporal : rite:string -> ('s, 'r) Vocab.t -> Date.t -> ('s, 'r) Temporal.t -> t + +(** Column names for [to_row]. Names and citations are excluded: they are + variable-arity and belong to richer encodings, added in Plan 5. *) +val headers : string list + +val to_row : t -> string list -- cgit v1.3