File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -2889,6 +2889,10 @@ module Knowledge = struct
2889
2889
Format. fprintf ppf " @,%a)@]@\n "
2890
2890
(Sexp. pp_hum_indent 2 ) (Dict. sexp_of_t data)))
2891
2891
2892
+ let objects cls = objects cls >> | fun {vals} ->
2893
+ Map. to_sequence vals |>
2894
+ Sequence. map ~f: fst
2895
+
2892
2896
module Rule = struct
2893
2897
type def = Registry .def
2894
2898
type doc = Registry .doc
Original file line number Diff line number Diff line change @@ -152,6 +152,10 @@ module Knowledge : sig
152
152
(* * a fully qualified name *)
153
153
type name
154
154
155
+ (* * [objects cls] is a seqeuence of all objects of the class [cls].
156
+ @since 2.2.0 *)
157
+ val objects : ('a ,_) cls -> 'a obj Sequence .t t
158
+
155
159
(* * [collect p x] collects the value of the property [p].
156
160
157
161
If the object [x] doesn't have a value for the property [p] and
You can’t perform that action at this time.
0 commit comments