diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/kernel/mass_formulary.ml | 8 | ||||
| -rw-r--r-- | lib/kernel/mass_formulary.mli | 26 |
2 files changed, 34 insertions, 0 deletions
diff --git a/lib/kernel/mass_formulary.ml b/lib/kernel/mass_formulary.ml new file mode 100644 index 0000000..8151720 --- /dev/null +++ b/lib/kernel/mass_formulary.ml @@ -0,0 +1,8 @@ +type source = Proper | Own_slug | Preceding_sunday | Common [@@deriving sexp] +type t = { said : Slug.t; via : source } [@@deriving sexp] + +let source_to_string = function + | Proper -> "proper" + | Own_slug -> "own" + | Preceding_sunday -> "preceding-sunday" + | Common -> "common" diff --git a/lib/kernel/mass_formulary.mli b/lib/kernel/mass_formulary.mli new file mode 100644 index 0000000..caea3eb --- /dev/null +++ b/lib/kernel/mass_formulary.mli @@ -0,0 +1,26 @@ +(** Which Mass a day actually says, and how that was decided. + + A day does not always say its own Mass. A weekday with no proper of its own + resumes the preceding Sunday's; a saint with no proper says a Common. The + resolution already happens inside a rite's {!Rite.readings} -- this type is + what makes the answer visible instead of discarding it once the citations + have been extracted. An ordo prints it as "Mass of the 9th Sunday after + Pentecost". + + Rite-agnostic by construction: it names a slug and a provenance, and + carries no rank, season or rubric vocabulary of any rite. *) + +type source = + | Proper (** the observed celebration's own citations *) + | Own_slug (** the lectionary's entry for the day's own slug *) + | Preceding_sunday (** a weekday with no proper resumes the preceding Sunday *) + | Common (** a saint's assigned Common *) +[@@deriving sexp] + +type t = { said : Slug.t; via : source } [@@deriving sexp] + +(** The slug whose Mass is said. For {!Proper} and {!Own_slug} this is the day's + own; for {!Preceding_sunday} it is that Sunday's TEMPORAL slug; for + {!Common} it is the Common's own id. *) + +val source_to_string : source -> string |
