• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MinaProtocol / mina / 358

13 Jun 2025 03:53PM UTC coverage: 31.724% (-15.4%) from 47.137%
358

push

buildkite

web-flow
Merge pull request #17410 from MinaProtocol/georgeee/synchronize-develop-compatible

Synchronize `develop` and `compatible` branches

33 of 352 new or added lines in 20 files covered. (9.38%)

18725 existing lines in 383 files now uncovered.

22485 of 70878 relevant lines covered (31.72%)

27782.14 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

16.67
/src/lib/mina_stdlib/map_set.ml
1
(** Utilities for dealing with "multimaps" or mapsets. *)
2

11✔
3
open Core_kernel
4

5
(* TODO consider using a lighter interface than Comparable.S *)
6
module Make (Key : Comparable.S) (Set : Generic_set.S0) = struct
7
  type t = Set.t Key.Map.t [@@deriving equal]
×
8

9
  (** Remove an element from a mapset. *)
10
  let remove_exn : t -> Key.t -> Set.el -> t =
11
   fun map k v ->
UNCOV
12
    let newset = Map.find_exn map k |> Fn.flip Set.remove v in
×
UNCOV
13
    if Set.is_empty newset then Map.remove map k
×
UNCOV
14
    else Map.set map ~key:k ~data:newset
×
15

16
  (* Add an element to a mapset. *)
17
  let insert : t -> Key.t -> Set.el -> t =
18
   fun map k v ->
UNCOV
19
    Map.change map k ~f:(fun set_opt ->
×
UNCOV
20
        match set_opt with
×
UNCOV
21
        | None ->
×
UNCOV
22
            Some (Set.singleton v)
×
UNCOV
23
        | Some set ->
×
UNCOV
24
            Some (Set.add set v) )
×
25
end
26

27
module Make_with_sexp_of
28
    (Key : Comparable.S) (Set : sig
29
      include Generic_set.S0
30

31
      val sexp_of_t : t -> Sexp.t
32
    end) =
33
struct
34
  include Make (Key) (Set)
35

36
  let sexp_of_t = [%sexp_of: Set.t Key.Map.t]
37
end
22✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc