aboutsummaryrefslogtreecommitdiff
path: root/lib/rites/rite_ef/precedence_ef.mli
blob: e8d4a11def346e51d40894745542579625c6950e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
(** RG 91's Table of Precedence for the EF (1962) rite: ranks any candidate
    for a given day by its RG 91 entry number. See
    docs/research/rules-register.md §4, whose 28-entry transcription this
    module follows line by line. *)

open Colitur_kernel

(** The universal (base) sanctoral layer's {!Celebration.t}.layer id. A
    Sanctoral-origin candidate whose layer is anything else is an overlay:
    "proper" (RG 91 entries 12, 19, 23) unless its layer id also carries
    {!indult_prefix} ("indult", entries 13, 20). This id and the prefix are
    colitur's own data-modelling convention, not an RG citation -- RG 91
    prescribes the ranking, not a machine encoding for it. Whichever task
    loads the real EF sanctoral base layer and its overlays must either
    reuse these two constants or this classifier will misfile them. *)
val universal_layer : string

(** See {!universal_layer}. *)
val indult_prefix : string

(** Returned for a candidate shape RG 91's 28-entry table has no row for --
    e.g. a [Class1] vigil that is not the Nativity or Pentecost (entries 5,
    9 are the only I-class vigils the table names), or a [Class4] candidate
    also marked as a vigil. Deliberately outside 1..28 and larger than any
    real entry, so an unclassified candidate can never win an occurrence
    contest by accident; a caller that sees it back knows the shape needs a
    new rule, not a silently wrong one. *)
val unclassified : int

(** [band ctx c]: RG 91's Table of Precedence. Returns the table's own entry
    number -- I class 1-13, II class 14-21, III class 22-26, IV class 27-28;
    lower wins (see {!Precedence.rules.band}). Total over every candidate
    {!Precedence.resolve} or {!Calendar} can construct, including shapes the
    1962 table itself does not describe (see {!unclassified}). *)
val band : Vocab_ef.season Precedence.context -> Vocab_ef.rank Precedence.candidate -> int