summaryrefslogtreecommitdiff
path: root/lib/kernel/rite.mli
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-11 19:39:37 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-11 19:39:37 +0200
commit6436509d6b599b7d7c6467bd39c8090cb9634889 (patch)
treeffc5a3f3d99a1aadcd9fc2db95990a70cc761468 /lib/kernel/rite.mli
parent9df1aab700ce4454c26c7d0ede5b51c0f0c96c66 (diff)
downloadcolitur-6436509d6b599b7d7c6467bd39c8090cb9634889.tar.gz
colitur-6436509d6b599b7d7c6467bd39c8090cb9634889.zip
kernel(rite): bundle what a rite supplies; make season runs rite-supplied
Validate took four loose arguments that had to come from the same rite with nothing enforcing it, and Calendar is about to add more. Bundling makes a mismatched assembly unrepresentable through the normal path. season_runs replaces the hardcoded assumption that every season occupies exactly one unbroken run. That holds for the 1962 rite but is false for the modern form's Ordinary Time, which is one season in two runs -- as written the check would have reported a false failure every year for the second rite.
Diffstat (limited to 'lib/kernel/rite.mli')
-rw-r--r--lib/kernel/rite.mli18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/kernel/rite.mli b/lib/kernel/rite.mli
new file mode 100644
index 0000000..db8e86f
--- /dev/null
+++ b/lib/kernel/rite.mli
@@ -0,0 +1,18 @@
+(** Everything a rite supplies, bundled. Passing these as loose arguments let a
+ caller pair one rite's vocab with another's temporal; bundling makes that
+ unrepresentable through the normal path. Carries functions, so it has no
+ sexp form. *)
+type ('s, 'r) t = {
+ id : string;
+ vocab : ('s, 'r) Vocab.t;
+ year_start : int -> Date.t;
+ (** first day of the liturgical year opening in civil year y *)
+ temporal : Date.t -> ('s, 'r) Temporal.t;
+ anchors : int -> (string * Date.t) list;
+ (** Easter-derived days: (expected slug, date) *)
+ rules : ('s, 'r) Precedence.rules;
+ season_runs : 's list;
+ (** the expected run-length-compressed season sequence over one liturgical
+ year. NOT necessarily [vocab.seasons]: a rite may have one season
+ appear in two separate runs (the modern form's Ordinary Time does). *)
+}