summaryrefslogtreecommitdiff
path: root/lib/rites/rite_ef/lectionary_ef.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rites/rite_ef/lectionary_ef.ml')
-rw-r--r--lib/rites/rite_ef/lectionary_ef.ml44
1 files changed, 15 insertions, 29 deletions
diff --git a/lib/rites/rite_ef/lectionary_ef.ml b/lib/rites/rite_ef/lectionary_ef.ml
index f9ce9ab..ec1aa0a 100644
--- a/lib/rites/rite_ef/lectionary_ef.ml
+++ b/lib/rites/rite_ef/lectionary_ef.ml
@@ -1,37 +1,23 @@
open Colitur_kernel
-(* [data/ef/lectionary.sexp] is located relative to the BUILD TREE, not the
- process's own cwd -- the same reasoning bin/main.ml's own [data_dir]
- documents at length: cwd varies with how the binary that eventually links
- this library is invoked (a user's shell for `dune exec colitur --`, a
- dune cram test's own sandboxed temp directory, `_build/default/test/` for
- `dune test`), and nothing in this project's build pins it to the
- repository root. [Sys.executable_name] resolves through /proc/self/exe on
- Linux, so it reports the executable's own canonical absolute path even
- when launched through a symlink (dune's cram sandbox places exactly one;
- confirmed working there already by bin/main.ml). Every executable that
- links this library -- bin/main.exe, test/test_colitur.exe,
- tools/*.exe -- sits exactly one directory below _build/default/, so
- climbing up twice and back down into data/ef always finds the file,
- regardless of the caller's own cwd. *)
-let data_path () =
- Filename.dirname (Filename.dirname Sys.executable_name) ^ "/data/ef/lectionary.sexp"
-
-(* Loaded once, at module initialisation: the data is year-independent and
- build_day is called 3 074 246 times over the full domain. *)
-let lectionary =
- match Lectionary.load (data_path ()) with
- | Ok l -> l
- | Error e -> failwith ("lectionary_ef: " ^ e)
-
(* Step 1: the observed celebration's own proper.
Step 2: the day's own temporal slug.
- Nothing here encodes "Lent has daily propers": the presence of an entry is
- the discriminator. Verified against lectio -- Lent 1 Monday returns its own
- Ezech 34:11-16, while Advent, Christmas and post-Pentecost Mondays return
- their Sunday's Mass. *)
-let readings ~observed ~temporal ~date:_ ~temporal_at:_ =
+ Nothing here encodes "Lent has daily propers": the presence of an entry in
+ [lectionary] is the sole discriminator -- this function does not branch on
+ season, rank, or any other field to decide whether a temporal slug "ought"
+ to have its own Mass.
+
+ The WARRANT for that shape is lectio's own observed behaviour only, not a
+ confirmed Missal citation: Lent 1 Monday returns its own Ezech 34:11-16,
+ while Advent, Christmas and post-Pentecost Mondays return their Sunday's
+ Mass, in both streams. docs/research/rules-register.md records this
+ openly as unconfirmed against the primary source ("EF reading-selection
+ rules ... Have lectio's behaviour; confirm against the Missal's
+ ferial-Mass rubrics when coding") -- that confirmation has not been done;
+ do not read this comment as citing RG/the Missal for the SELECTION rule
+ itself, only [Lectionary.find]'s presence-or-absence as the mechanism. *)
+let readings ~lectionary ~observed ~temporal ~date:_ ~temporal_at:_ =
match observed.Celebration.citations with
| _ :: _ as cs -> cs
| [] -> (