aboutsummaryrefslogtreecommitdiffstats
path: root/lib/concepts/Mode.mli
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-10-11 00:17:53 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-10-11 00:17:53 -0300
commit470491974d1498a1982a4e4b3560370bdf3d8c27 (patch)
treeba4208b73b3f921545df4e0101747f083d8c0602 /lib/concepts/Mode.mli
parent0161187d843c84011749139a85c0eb31685bbc4c (diff)
parent90e41279094c26e6fcc93966708374b8ceba80e4 (diff)
downloadRNT-470491974d1498a1982a4e4b3560370bdf3d8c27.tar.gz
RNT-470491974d1498a1982a4e4b3560370bdf3d8c27.zip
merge lifecycle-ergonomics and rework modes and contain checks
Diffstat (limited to 'lib/concepts/Mode.mli')
-rw-r--r--lib/concepts/Mode.mli27
1 files changed, 7 insertions, 20 deletions
diff --git a/lib/concepts/Mode.mli b/lib/concepts/Mode.mli
index 6a906d1..d91b2ab 100644
--- a/lib/concepts/Mode.mli
+++ b/lib/concepts/Mode.mli
@@ -1,27 +1,14 @@
-type attribute = string
type attributes = BatSet.String.t
-(** what asking a relation under a given set of bound attributes
- affords. The answer is to whether anything satisfies the binding,
- or the bindings of the attributes left free together with the
- class of what is produced. *)
-type affordance = Decides | Generates of Cardinality.t
+(** given [bound], every matching tuple can be produced, and there are
+ at most [yields]. *)
+type mode = {bound: attributes; yields: Cardinality.t}
-type mode = {bound: attributes; affords: affordance}
-type t
+type t = mode list
-val attributes_of_list : attribute list -> attributes
-val attributes_of_map : 'a BatMap.String.t -> attributes
-val decides_when : attribute list -> mode
-val enumerable : Cardinality.t -> mode
-val of_list : mode list -> t
-
-(** the tightest class declared for generating under [bound]. A mode
- declared for fewer bound attributes applies to more, since the
- attributes left free are then fewer and no more numerous. *)
+val mode : string list -> Cardinality.t -> mode
val generation : t -> attributes -> Cardinality.t option
-
val exhaustible : t -> attributes -> bool
-(** declared outright, or implied by a generation that can be exhausted. *)
-val decision : t -> attributes -> bool
+(** the modes still usable when only [attributes] can be bound. *)
+val project : attributes -> t -> t