sig
  module Item :
    sig
      type ('v, 'k) t = { name : string; item : 'v; kind : 'k; }
      val item : ('v, 'k) Stable_matching.Item.t -> 'v
    end
  type left_index = int
  type right_index = int
  type rank = int
  type ('a, 'v) matches = {
    left : 'a list;
    pairs : ('v * 'v) list;
    right : 'a list;
  }
  type ('v, 'k) item_matches =
      (('v, 'k) Stable_matching.Item.t, 'v) Stable_matching.matches
  type unstable_matching = {
    first : Stable_matching.left_index * Stable_matching.right_index;
    second : Stable_matching.left_index * Stable_matching.right_index;
    current_rank : Stable_matching.rank * Stable_matching.rank;
    optimal : Stable_matching.rank * Stable_matching.rank;
  }
  val stable_matches :
    distance:(int -> int -> int) ->
    ('a, int) Stable_matching.matches ->
    (unit, Stable_matching.unstable_matching) Stdlib.Result.t
  val strong_stable_matches :
    distance:(int -> int -> int) ->
    ('a, int) Stable_matching.matches ->
    (unit, Stable_matching.unstable_matching) Stdlib.Result.t
  val matches :
    compatible:(Stable_matching.left_index ->
                Stable_matching.right_index -> bool) ->
    preferences:(Stable_matching.right_index ->
                 (Stable_matching.left_index * Stable_matching.rank) array) ->
    size:int * int -> (int, int) Stable_matching.matches
  val fuzzy_match_names :
    compatibility:('-> '-> bool) ->
    max_right_items:int ->
    cutoff:(string -> int) ->
    ('v, 'k) Stable_matching.Item.t list ->
    ('v, 'k) Stable_matching.Item.t list ->
    ('v, 'k) Stable_matching.item_matches
end