diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-18 13:13:40 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-18 13:13:40 +0200 |
| commit | 8d0ab547895460956e36b66b47a299b02a3474f0 (patch) | |
| tree | 86bd03b8cef502cb603550ce0b657d2fe87c68af /lib/kernel/layer.mli | |
| parent | 084ff22997af208715656924d9fc23bf2ec10050 (diff) | |
| download | colitur-8d0ab547895460956e36b66b47a299b02a3474f0.tar.gz colitur-8d0ab547895460956e36b66b47a299b02a3474f0.zip | |
feat(overlay): default citations and layer, humanise parse errors
A user-supplied overlay is the only sexp this engine reads that a human writes
by hand, and two of Celebration.t's eight fields carry nothing such an author
can meaningfully supply: citations is always empty for a local feast, since
citations come from the rite's lectionary and never from calendar data, and
layer merely repeats the overlay file's own id.
Requiring both made the commonest first mistake -- omitting them -- fail with
'lib/kernel/celebration.ml.t_of_sexp: the following record elements were
undefined: citations layer', which names a source file the author will never
open and does not say what to write instead. A minimal local feast needed 12
lines, two of them noise.
Overlay.load now fills each field only where ABSENT, so an explicitly stated
value always wins: an overlay may legitimately name a layer different from its
own id, and defaulting must not silently overwrite that. A test pins both
directions.
Deliberately scoped to overlays. Layer.load, which reads the shipped
sanctoral, is untouched and stays strict -- that data is the project's own,
every field of it is asserted by tests, and a missing one there is a defect
rather than a convenience.
Parse failures also stop naming kernel source paths: the five prefixes that
actually reach a user are rewritten into the vocabulary of the file being
edited, and anything unrecognised passes through verbatim rather than being
reworded into something possibly wrong.
Diffstat (limited to 'lib/kernel/layer.mli')
0 files changed, 0 insertions, 0 deletions
