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

MinaProtocol / mina / 411

24 Jul 2025 03:14PM UTC coverage: 33.188% (-27.7%) from 60.871%
411

push

buildkite

web-flow
Merge pull request #17541 from MinaProtocol/brian/merge-compatible-into-develop

Merge compatible into develop

164 of 702 new or added lines in 96 files covered. (23.36%)

18243 existing lines in 393 files now uncovered.

23983 of 72264 relevant lines covered (33.19%)

24667.26 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

61✔
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
122✔
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