aboutsummaryrefslogtreecommitdiff
path: root/lib/kernel/validate.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/validate.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/validate.mli')
-rw-r--r--lib/kernel/validate.mli32
1 files changed, 15 insertions, 17 deletions
diff --git a/lib/kernel/validate.mli b/lib/kernel/validate.mli
index 709a711..d281f9a 100644
--- a/lib/kernel/validate.mli
+++ b/lib/kernel/validate.mli
@@ -5,26 +5,24 @@ type failure = { year : int; date : string; check : string; detail : string }
val failure_to_string : failure -> string
-(** [run vocab ~year_start ~temporal ~anchors ~year] returns every invariant
- violation in the liturgical year opening in civil year [year]. An empty
- list means the year is clean.
+(** [run rite ~year] returns every invariant violation in the liturgical year
+ opening in civil year [year]. An empty list means the year is clean.
- [anchors y] is the rite's own independent restatement of its fixed and
- Easter-derived named days for civil year [y], as (expected slug, date)
- pairs -- not derived from [temporal] itself, so a drift between the two
- is caught rather than invisible. [run] consults both [anchors year] and
- [anchors (year + 1)], since a liturgical year straddles two civil years,
- and checks only the pairs whose date actually falls within the year
- walked.
+ [rite.Rite.anchors y] is the rite's own independent restatement of its
+ fixed and Easter-derived named days for civil year [y], as (expected
+ slug, date) pairs -- not derived from [rite.Rite.temporal] itself, so a
+ drift between the two is caught rather than invisible. [run] consults
+ both [anchors year] and [anchors (year + 1)], since a liturgical year
+ straddles two civil years, and checks only the pairs whose date actually
+ falls within the year walked.
+
+ The season check compares the run-length-compressed season sequence
+ against [rite.Rite.season_runs], not [rite.Rite.vocab.seasons]: a rite may
+ have one season appear in two separate runs (the modern form's Ordinary
+ Time does), so the two are not necessarily the same list.
Total over the whole 1583..9999 domain, including [year] = 9999: the
liturgical year opening there continues into out-of-domain civil year
10000, so the walk is clamped to 31 December 9999 and the checks run
against that truncated final year rather than raising. *)
-val run :
- ('s, 'r) Vocab.t ->
- year_start:(int -> Date.t) ->
- temporal:(Date.t -> ('s, 'r) Temporal.t) ->
- anchors:(int -> (string * Date.t) list) ->
- year:int ->
- failure list
+val run : ('s, 'r) Rite.t -> year:int -> failure list