aboutsummaryrefslogtreecommitdiff
path: root/lib/kernel/calendar.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kernel/calendar.ml')
-rw-r--r--lib/kernel/calendar.ml21
1 files changed, 14 insertions, 7 deletions
diff --git a/lib/kernel/calendar.ml b/lib/kernel/calendar.ml
index fd23377..1cdd1fa 100644
--- a/lib/kernel/calendar.ml
+++ b/lib/kernel/calendar.ml
@@ -35,6 +35,15 @@ let year_bounds (rite : ('s, 'r) Rite.t) (y : int) : Date.t * Date.t =
in
(start, stop)
+(* [resolution.deferred] (RG 96-98 transfer candidates) has nowhere to be
+ PLACED yet -- Task 6 adds the fixed-point pass that does -- but it must
+ still be accounted for on the day it lost, not silently dropped: Task
+ 12's no-celebration-lost invariant reads [Liturgical_day.omitted], so a
+ deferred candidate folds in there too, with its own reason distinct from
+ Precedence's native omissions ("omitted: yielded to a higher day",
+ "omitted: admission limit reached"). *)
+let deferred_reason = "deferred: transfer placement not yet implemented (Task 6)"
+
(* RG 91's contest for one date: the temporal office against every sanctoral
entry whose Date_spec resolves to it. [Layer.on_date] is keyed on exactly
(month, day), which for a [Fixed] spec -- the only form Plan 2 ships -- is
@@ -53,13 +62,10 @@ let resolve_day (rite : ('s, 'r) Rite.t) (idx : 'r Layer.by_date) (date : Date.t
in
let ctx = { Precedence.date; season = temporal.Temporal.season; weekday = temporal.Temporal.weekday } in
let resolution = Precedence.resolve rite.Rite.rules ctx ~temporal:temporal_candidate ~sanctoral in
- (* [resolution.deferred] (RG 96-98 transfer candidates) and
- [resolution.omitted] (yielded/admission-limit losers) have no field to
- land in on Liturgical_day.t yet, so both are simply absent from today's
- result -- deliberately incomplete for a deferred candidate, which is
- thereby neither observed nor commemorated here, and not yet placed on
- any later day either ("deferred: transfer placement not yet implemented
- (Task 6)"). Task 6's fixed-point pass closes this gap. *)
+ let omitted =
+ List.map (fun (c, reason) -> (c.Precedence.cel, reason)) resolution.Precedence.omitted
+ @ List.map (fun c -> (c.Precedence.cel, deferred_reason)) resolution.Precedence.deferred
+ in
{
Liturgical_day.date;
rite = rite.Rite.id;
@@ -69,6 +75,7 @@ let resolve_day (rite : ('s, 'r) Rite.t) (idx : 'r Layer.by_date) (date : Date.t
List.map (fun (c, p) -> (c.Precedence.cel, p)) resolution.Precedence.commemorations;
transferred_in = None;
transferred_out = None;
+ omitted;
citations = [];
}