From e76cc6f862656a3ada9fa3d4418bd060df937885 Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Sat, 31 Oct 2026 02:27:40 -0300 Subject: format and where claude on fol --- lib/concepts/Mode.ml | 3 +++ lib/concepts/Mode.mli | 2 ++ 2 files changed, 5 insertions(+) (limited to 'lib/concepts') diff --git a/lib/concepts/Mode.ml b/lib/concepts/Mode.ml index 82c207f..b3031fc 100644 --- a/lib/concepts/Mode.ml +++ b/lib/concepts/Mode.ml @@ -16,3 +16,6 @@ let exhaustible modes bound = Option.fold ~none:false ~some:Cardinality.exhaustible (generation modes bound) let project attributes = List.filter (fun {bound; _} -> BatSet.String.subset bound attributes) + +let given attributes = + List.map (fun {bound; yields} -> {bound= BatSet.String.diff bound attributes; yields}) diff --git a/lib/concepts/Mode.mli b/lib/concepts/Mode.mli index d91b2ab..ba1a04a 100644 --- a/lib/concepts/Mode.mli +++ b/lib/concepts/Mode.mli @@ -12,3 +12,5 @@ val exhaustible : t -> attributes -> bool (** the modes still usable when only [attributes] can be bound. *) val project : attributes -> t -> t + +val given : attributes -> t -> t -- cgit v1.2.3