aboutsummaryrefslogtreecommitdiff
path: root/lib/kernel/celebration.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kernel/celebration.ml')
-rw-r--r--lib/kernel/celebration.ml20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/kernel/celebration.ml b/lib/kernel/celebration.ml
new file mode 100644
index 0000000..3f7a577
--- /dev/null
+++ b/lib/kernel/celebration.ml
@@ -0,0 +1,20 @@
+open Sexplib0.Sexp_conv
+
+(* A celebration as computed or as loaded from a layer.
+
+ One type parameter, not two: the record has no season field, and OCaml
+ rejects a type variable that appears in no field. *)
+type 'r t = {
+ slug : Slug.t;
+ names : Names.t;
+ rank : 'r;
+ colour : Colour.t;
+ subject : Subject.t;
+ citations : Citation.t list;
+ layer : string; (** provenance: "temporal", a layer id, or an overlay id *)
+}
+[@@deriving sexp]
+
+let make ~slug ?(names = Names.empty) ~rank ~colour ?(subject = Subject.Temporal)
+ ?(citations = []) ~layer () =
+ { slug; names; rank; colour; subject; citations; layer }