aboutsummaryrefslogtreecommitdiffstats
path: root/lib/concepts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/concepts')
-rw-r--r--lib/concepts/Mode.ml1
-rw-r--r--lib/concepts/Mode.mli1
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/concepts/Mode.ml b/lib/concepts/Mode.ml
index 6ac1704..fc3ef84 100644
--- a/lib/concepts/Mode.ml
+++ b/lib/concepts/Mode.ml
@@ -5,6 +5,7 @@ type mode = {bound: attributes; affords: affordance}
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 =
diff --git a/lib/concepts/Mode.mli b/lib/concepts/Mode.mli
index 8d84093..018eeb2 100644
--- a/lib/concepts/Mode.mli
+++ b/lib/concepts/Mode.mli
@@ -11,6 +11,7 @@ type mode = {bound: attributes; affords: affordance}
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