package base_trie

  1. Overview
  2. Docs
module type Impl = sig ... end
module type Listable = sig ... end
type ('chain, 'desc) t = private (module Impl with type keychain_witness = 'wit and type t = 'chain and type Iterator.iterator_witness = 'idx and type Iterator.t = 'iter and type Key.comparator_witness = 'cmp and type Key.t = 'key) constraint 'desc = 'wit * 'key * 'cmp * 'iter * 'idx

A first-class module implementing a keychain type, wrapped in a GADT to combine several type parameters that are irrelevant to most users.

This type is private so that users can only construct it via Make and other related functors below.

module type S = sig ... end

Accessors into an implementation.

val sexp_of_keychain : ('chain, _) t -> 'chain -> Base.Sexp.t
val sexp_of_key : (_, _ * 'key * _ * _ * _) t -> 'key -> Base.Sexp.t
val keychain_of_rev_keys : ('chain, _ * 'key * _ * _ * _) t -> 'key Base.list -> 'chain
val comparator : (_, _ * 'key * 'cmp * _ * _) t -> ('key, 'cmp) Base.Comparator.t
val comparator_m : (_, _ * 'key * 'cmp * _ * _) t -> (module Base.Comparator.S with type comparator_witness = 'cmp and type t = 'key)
val iterator : ('chain, _ * 'key * _ * 'iter * 'idx) t -> ('iter, 'chain, 'key, 'idx) Iterator.t
val iterator_m : ('chain, _ * 'key * _ * 'iter * 'idx) t -> (module Iterator.S0 with type elt = 'key and type iterator_witness = 'idx and type seq = 'chain and type t = 'iter)
val start : ('chain, _ * _ * _ * 'iter * _) t -> 'chain -> 'iter
val is_finished : ('chain, _ * _ * _ * 'iter * _) t -> 'iter -> 'chain -> Base.bool
val get_exn : ('chain, _ * 'key * _ * 'iter * _) t -> 'iter -> 'chain -> 'key
val next_exn : ('chain, _ * _ * _ * 'iter * _) t -> 'iter -> 'chain -> 'iter

Functors and modules implementing keychains.

module Make (Impl : Impl) : S with module Key = Impl.Key and module Iterator = Impl.Iterator and type keychain_witness = Impl.keychain_witness
OCaml

Innovation. Community. Security.