Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file collated_intf.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119openCoremoduleWhich_range=Collate.Which_rangemoduletypeParametrized=sig(** The result of collation - a filtered, sorted and restricted-to-a-range list of keys
and values. The underlying data structure is a bit more sophisticated than a list,
to provide better diffing.
To get an implementation of [Diffable] interface, you'll need to instantiate
[Make_concrete].
*)type('k,'v)t[@@derivingsexp,bin_io,compare,equal,diff]valempty:_tvalfold:('k,'v)t->init:'accum->f:('accum->'k*'v->'accum)->'accumvaliter:('k,'v)t->f:('k*'v->unit)->unitvalto_alist:('k,'v)t->('k*'v)listvalto_opaque_map:('k,'v)t->('k*'v)Opaque_map.tvalfirst:('k,'v)t->('k*'v)optionvallast:('k,'v)t->('k*'v)optionvalmapi:('k,'v1)t->f:('k->'v1->'v2)->('k,'v2)tvallength:_t->int(** Total number of rows before filtering *)valnum_unfiltered_rows:_t->int(** Total number of rows after filtering, but before limiting to range. *)valnum_filtered_rows:_t->int(** Total number of rows that preceed the rank-range and key-range ranges. *)valnum_before_range:_t->int(** Total number of rows that follow the rank-range and key-range ranges. *)valnum_after_range:_t->int(** The key range this result was computed for *)valkey_range:('k,_)t->'kWhich_range.t(** The rank range this result was computed for *)valrank_range:_t->intWhich_range.tmoduleStable:sigmoduleV1:sigtypenonrec('k,'v)t=('k,'v)t[@@derivingsexp,bin_io,stable_witness]includeDiffable.S2withtype('k,'v)t:=('k,'v)tendendmodulePrivate:sigvalcreate:data:('k*'v)Opaque_map.t->num_filtered_rows:int->key_range:'kWhich_range.t->rank_range:intWhich_range.t->num_before_range:int->num_unfiltered_rows:int->('k,'v)tendmoduleFor_testing:sig(** Create Collated.t of a list of data. Note: no collation or checks are performed,
it will contain exactly the data you provided *)valof_list:num_filtered_rows:int->key_range:'kWhich_range.t->rank_range:intWhich_range.t->num_before_range:int->num_unfiltered_rows:int->('k*'v)list->('k,'v)tendendmoduletypeBin_comp_sexp=sigtypet[@@derivingbin_io,sexp,compare,equal]endmoduletypeConcrete=sigmoduleKey:Bin_comp_sexpmoduleValue:Bin_comp_sexptype('k,'v)parametrizedtypet=(Key.t,Value.t)parametrized[@@derivingsexp,bin_io,compare,equal]valempty:tvalfold:t->init:'accum->f:('accum->Key.t*Value.t->'accum)->'accumvaliter:t->f:(Key.t*Value.t->unit)->unitvalto_alist:t->(Key.t*Value.t)listvalto_opaque_map:t->(Key.t*Value.t)Opaque_map.tvalfirst:t->(Key.t*Value.t)optionvallast:t->(Key.t*Value.t)optionvallength:t->intvalnum_filtered_rows:t->intvalnum_unfiltered_rows:t->intvalkey_range:t->Key.tWhich_range.tvalrank_range:t->intWhich_range.tincludeLegacy_diffable.Swithtypet:=tincludeStreamable.Swithtypet:=t(** This strange value just encodes the fact that this type does not yet implement
[Ldiffable.S]. When it does, delete this and then the compiler will show you places
to update. *)valthis_type_does_not_support_ldiffable:unitvalfind_by_key:t->Key.t->Value.toptionvalprev:t->Key.t->(Key.t*Value.t)optionvalnext:t->Key.t->(Key.t*Value.t)optionendmoduletypeCollated=sigincludeParametrizedmoduletypeConcrete=Concretewithtype('k,'v)parametrized=('k,'v)tmoduleMake_concrete(Key:Bin_comp_sexp)(Value:Bin_comp_sexp):ConcretewithtypeKey.t=Key.tandtypeValue.t=Value.tend