From abade24943f2f77c058b5ff768093b8babc9a8c3 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Tue, 11 Aug 2026 11:59:43 +0200 Subject: kernel: Vocab, Celebration and Temporal parametric types Rite specificity is carried by type parameters plus a vocab record of operations rather than by functors: the same guarantee that a rite cannot name another rite's season, without threading module plumbing through every kernel module. Celebration takes only the rank parameter, since it has no season field and OCaml rejects a type variable that appears in no field. --- lib/kernel/celebration.mli | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lib/kernel/celebration.mli (limited to 'lib/kernel/celebration.mli') diff --git a/lib/kernel/celebration.mli b/lib/kernel/celebration.mli new file mode 100644 index 0000000..1c84d35 --- /dev/null +++ b/lib/kernel/celebration.mli @@ -0,0 +1,16 @@ +(** A celebration. Parameterised by the rite's rank type only. *) +type 'r t = { + slug : Slug.t; + names : Names.t; + rank : 'r; + colour : Colour.t; + subject : Subject.t; + citations : Citation.t list; + layer : string; +} +[@@deriving sexp] + +(** [subject] defaults to [Subject.Temporal], [names] to empty, [citations] to []. *) +val make : + slug:Slug.t -> ?names:Names.t -> rank:'r -> colour:Colour.t -> + ?subject:Subject.t -> ?citations:Citation.t list -> layer:string -> unit -> 'r t -- cgit v1.3