From f1dbfbe52130e205e8f960d26d2c9b2222057482 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Fri, 17 Jan 2025 00:12:16 +0000 Subject: [PATCH] refactor(pkg): write out signature for role map (#11312) Signed-off-by: Rudi Grinberg --- src/0install-solver/s.ml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/0install-solver/s.ml b/src/0install-solver/s.ml index 41ca97183fd..ecbcc935e6c 100644 --- a/src/0install-solver/s.ml +++ b/src/0install-solver/s.ml @@ -108,7 +108,18 @@ module type SELECTIONS = sig (** Some selections previously produced by a solver. *) include CORE_MODEL - module RoleMap : Map.S with type key = Role.t + + module RoleMap : sig + type key = Role.t + type 'a t + + val find_opt : key -> 'a t -> 'a option + val iter : (key -> 'a -> unit) -> 'a t -> unit + val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc + val of_seq : (key * 'a) Seq.t -> 'a t + val to_seq : 'a t -> (key * 'a) Seq.t + val bindings : 'a t -> (key * 'a) list + end type t