summaryrefslogtreecommitdiff
path: root/lib/kernel/validate.mli
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kernel/validate.mli')
-rw-r--r--lib/kernel/validate.mli16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/kernel/validate.mli b/lib/kernel/validate.mli
new file mode 100644
index 0000000..b557731
--- /dev/null
+++ b/lib/kernel/validate.mli
@@ -0,0 +1,16 @@
+(** The invariant harness -- validation layer 2. Checks run over a *liturgical*
+ year, not a civil year: a season that straddles January would otherwise look
+ as though it recurs. *)
+type failure = { year : int; date : string; check : string; detail : string }
+
+val failure_to_string : failure -> string
+
+(** [run vocab ~year_start ~temporal ~year] returns every invariant violation in
+ the liturgical year opening in civil year [year]. An empty list means the
+ year is clean. *)
+val run :
+ ('s, 'r) Vocab.t ->
+ year_start:(int -> Date.t) ->
+ temporal:(Date.t -> ('s, 'r) Temporal.t) ->
+ year:int ->
+ failure list