aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/concepts/Mode.ml4
-rw-r--r--lib/concepts/Mode.mli1
-rw-r--r--lib/evaluators/Constraint.ml2
3 files changed, 6 insertions, 1 deletions
diff --git a/lib/concepts/Mode.ml b/lib/concepts/Mode.ml
index b7aa814..5ac895e 100644
--- a/lib/concepts/Mode.ml
+++ b/lib/concepts/Mode.ml
@@ -7,6 +7,10 @@ type t = mode list
let attributes_of_list = BatSet.String.of_list
let attributes_of_map map = BatMap.String.keys map |> BatSet.String.of_enum
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 of_list modes = modes
diff --git a/lib/concepts/Mode.mli b/lib/concepts/Mode.mli
index 6a906d1..9ae65c1 100644
--- a/lib/concepts/Mode.mli
+++ b/lib/concepts/Mode.mli
@@ -13,6 +13,7 @@ type t
val attributes_of_list : attribute list -> attributes
val attributes_of_map : 'a BatMap.String.t -> attributes
val decides_when : attribute list -> mode
+val generates_when : attribute list -> Cardinality.t -> mode
val enumerable : Cardinality.t -> mode
val of_list : mode list -> t
diff --git a/lib/evaluators/Constraint.ml b/lib/evaluators/Constraint.ml
index b484240..5ccd1ae 100644
--- a/lib/evaluators/Constraint.ml
+++ b/lib/evaluators/Constraint.ml
@@ -315,7 +315,7 @@ module Derivation = struct
in
Ok ()
in
- Ok (Kernel.Generator.cursor_of ~on_release:(fun () -> Live.abandoned live) produce)
+ Ok (Kernel.Generator.cursor_of ~finally:(fun () -> Live.abandoned live) produce)
end
module Derived = Kernel.EphemeralRelation.Make (Derivation)