diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-11 11:59:43 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-11 11:59:43 +0200 |
| commit | abade24943f2f77c058b5ff768093b8babc9a8c3 (patch) | |
| tree | 33285f68860d21144bdad8388fabaf073b4771cb /lib/kernel/vocab.mli | |
| parent | 8b6c0036cb6c7f0e48a9370f53be25fd2bb243f4 (diff) | |
| download | colitur-abade24943f2f77c058b5ff768093b8babc9a8c3.tar.gz colitur-abade24943f2f77c058b5ff768093b8babc9a8c3.zip | |
kernel: Vocab, Celebration and Temporal parametric types
Rite specificity is carried by type parameters plus a vocab record of
operations rather than by functors: the same guarantee that a rite cannot name
another rite's season, without threading module plumbing through every kernel
module. Celebration takes only the rank parameter, since it has no season
field and OCaml rejects a type variable that appears in no field.
Diffstat (limited to 'lib/kernel/vocab.mli')
| -rw-r--r-- | lib/kernel/vocab.mli | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/kernel/vocab.mli b/lib/kernel/vocab.mli new file mode 100644 index 0000000..78729bb --- /dev/null +++ b/lib/kernel/vocab.mli @@ -0,0 +1,19 @@ +(* A rite's season and rank vocabulary, as a record of operations. Carries + functions, so it has no sexp form. + + The kernel is parameterised by type variables plus this record rather than by + functors (spec ยง2.3): the safety that matters -- EF code cannot name an OF + season -- is the same either way, and ppx_sexp_conv derives converters for + parametric types natively. *) +type ('s, 'r) t = { + seasons : 's list; + (** canonical liturgical-year order; Validate's contiguity check reads this *) + season_to_string : 's -> string; + season_of_string : string -> 's option; + ranks : 'r list; + (** documentation order, highest first. Plan 2 uses it only for the + closure check -- it is not a precedence relation until Plan 3 + defines one. *) + rank_to_string : 'r -> string; + rank_of_string : string -> 'r option; +} |
