From ad33454a204aa5791445e7d15f02ba0447fff85e Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Mon, 12 Oct 2026 11:58:25 -0300 Subject: relation scan with enumerable and release --- lib/kernel/Multigroup.ml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/kernel/Multigroup.ml') diff --git a/lib/kernel/Multigroup.ml b/lib/kernel/Multigroup.ml index 9fbd386..669babb 100644 --- a/lib/kernel/Multigroup.ml +++ b/lib/kernel/Multigroup.ml @@ -192,12 +192,8 @@ module Make (S : Abstract.Storage.STORAGE) = struct if not (Concepts.Mode.exhaustible modes BatSet.String.empty) then Error (Error.unjudgeable name) else - let* enumerable = Protocols.Enumerable.require relation in - let* cursor = Protocols.Enumerable.enumerate enumerable in - Protocols.Handle.releasing cursor (fun () -> - let* scan = Protocols.Cursor.require cursor in - let* first = Protocols.Cursor.next scan in - Ok (Option.to_list (Option.map (fun witness -> name, witness) first)) ) ) ) + let* first = Protocols.Enumerable.scan relation Protocols.Cursor.next in + Ok (Option.to_list (Option.map (fun witness -> name, witness) first)) ) ) class multigroup ?bind conn value schema_tree denial_tree = object (self) -- cgit v1.2.3