aboutsummaryrefslogtreecommitdiffstats
path: root/lib/concepts/Mode.ml
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-09-20 02:14:10 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-09-20 02:14:10 -0300
commitf53d887d23d7743bc40c3b552c27d9ae30a72acd (patch)
tree965f1ff7a4825d5d8843c612d1e6b37172478bcd /lib/concepts/Mode.ml
parentf76392a009f620b1717718001250e47ac71c3c9c (diff)
downloadRNT-f53d887d23d7743bc40c3b552c27d9ae30a72acd.tar.gz
RNT-f53d887d23d7743bc40c3b552c27d9ae30a72acd.zip
format
Diffstat (limited to '')
-rw-r--r--lib/concepts/Mode.ml6
-rw-r--r--lib/concepts/Mode.mli1
2 files changed, 2 insertions, 5 deletions
diff --git a/lib/concepts/Mode.ml b/lib/concepts/Mode.ml
index 4d7501c..23abacf 100644
--- a/lib/concepts/Mode.ml
+++ b/lib/concepts/Mode.ml
@@ -5,14 +5,12 @@ type mode = {bound: attributes; affords: affordance}
type t = mode list
let attributes_of_list = BatSet.String.of_list
-
let decides_when bound = {bound= attributes_of_list bound; affords= Decides}
let generates_when bound cardinality =
{bound= attributes_of_list bound; affords= Generates cardinality}
let enumerable cardinality = {bound= BatSet.String.empty; affords= Generates cardinality}
-
let empty = []
let declare mode declaration = mode :: declaration
let of_list modes = modes
@@ -33,7 +31,5 @@ let generation declaration bound =
let decision declaration bound =
List.exists
(fun {bound= declared; affords} ->
- match affords with
- | Decides -> BatSet.String.equal declared bound
- | Generates _ -> false )
+ match affords with Decides -> BatSet.String.equal declared bound | Generates _ -> false )
declaration
diff --git a/lib/concepts/Mode.mli b/lib/concepts/Mode.mli
index 57b079f..982518a 100644
--- a/lib/concepts/Mode.mli
+++ b/lib/concepts/Mode.mli
@@ -23,4 +23,5 @@ val to_list : t -> mode list
declared for fewer bound attributes applies to more, since the
attributes left free are then fewer and no more numerous. *)
val generation : t -> attributes -> Cardinality.t option
+
val decision : t -> attributes -> bool