package base_trie

  1. Overview
  2. Docs

Module Trie.KeychainableSource

Sourcemodule type Impl = sig ... end
Sourcemodule type Listable = sig ... end
Sourcetype ('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.

Sourcemodule type S = sig ... end

Accessors into an implementation.

Sourceval sexp_of_keychain : ('chain, _) t -> 'chain -> Base.Sexp.t
Sourceval sexp_of_key : (_, _ * 'key * _ * _ * _) t -> 'key -> Base.Sexp.t
Sourceval keychain_of_rev_keys : ('chain, _ * 'key * _ * _ * _) t -> 'key Base.list -> 'chain
Sourceval comparator : (_, _ * 'key * 'cmp * _ * _) t -> ('key, 'cmp) Base.Comparator.t
Sourceval comparator_m : (_, _ * 'key * 'cmp * _ * _) t -> (module Base.Comparator.S with type comparator_witness = 'cmp and type t = 'key)
Sourceval iterator : ('chain, _ * 'key * _ * 'iter * 'idx) t -> ('iter, 'chain, 'key, 'idx) Iterator.t
Sourceval 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)
Sourceval start : ('chain, _ * _ * _ * 'iter * _) t -> 'chain -> 'iter
Sourceval is_finished : ('chain, _ * _ * _ * 'iter * _) t -> 'iter -> 'chain -> Base.bool
Sourceval get_exn : ('chain, _ * 'key * _ * 'iter * _) t -> 'iter -> 'chain -> 'key
Sourceval next_exn : ('chain, _ * _ * _ * 'iter * _) t -> 'iter -> 'chain -> 'iter

Functors and modules implementing keychains.

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