aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel/liturgical_day.ml19
-rw-r--r--lib/kernel/liturgical_day.mli17
2 files changed, 36 insertions, 0 deletions
diff --git a/lib/kernel/liturgical_day.ml b/lib/kernel/liturgical_day.ml
new file mode 100644
index 0000000..65e3ba5
--- /dev/null
+++ b/lib/kernel/liturgical_day.ml
@@ -0,0 +1,19 @@
+open Sexplib0.Sexp_conv
+
+(* The single stable result schema (parent spec §2). *)
+type ('s, 'r) t = {
+ date : Date.t;
+ rite : string;
+ temporal : ('s, 'r) Temporal.t;
+ (** embedded, not flattened: it is already a coherent unit with its own
+ invariants, and re-listing season/week/weekday here would create two
+ places for them to disagree *)
+ observed : 'r Celebration.t;
+ commemorations : ('r Celebration.t * Precedence.privilege) list;
+ transferred_in : 'r Celebration.t option;
+ (** arrived here from an impeded day *)
+ transferred_out : Date.t option;
+ (** this day's celebration went there *)
+ citations : Citation.t list; (** always empty until Plan 4 *)
+}
+[@@deriving sexp]
diff --git a/lib/kernel/liturgical_day.mli b/lib/kernel/liturgical_day.mli
new file mode 100644
index 0000000..3c331c3
--- /dev/null
+++ b/lib/kernel/liturgical_day.mli
@@ -0,0 +1,17 @@
+(** The single stable result schema (parent spec §2). *)
+type ('s, 'r) t = {
+ date : Date.t;
+ rite : string;
+ temporal : ('s, 'r) Temporal.t;
+ (** embedded, not flattened: it is already a coherent unit with its own
+ invariants, and re-listing season/week/weekday here would create two
+ places for them to disagree *)
+ observed : 'r Celebration.t;
+ commemorations : ('r Celebration.t * Precedence.privilege) list;
+ transferred_in : 'r Celebration.t option;
+ (** arrived here from an impeded day *)
+ transferred_out : Date.t option;
+ (** this day's celebration went there *)
+ citations : Citation.t list; (** always empty until Plan 4 *)
+}
+[@@deriving sexp]