123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172(*
* Copyright (c) 2013-2017 Thomas Gazagnaire <thomas@gazagnaire.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*)moduletypeS=sig(** {1 Slices} *)typet(** The type for slices. *)typecontents(** The type for exported contents. *)typenode(** The type for exported nodes. *)typecommit(** The type for exported commits. *)typevalue=[`Contentsofcontents|`Nodeofnode|`Commitofcommit](** The type for exported values. *)valempty:unit->tLwt.t(** Create a new empty slice. *)valadd:t->value->unitLwt.t(** [add t v] adds [v] to [t]. *)valiter:t->(value->unitLwt.t)->unitLwt.t(** [iter t f] calls [f] on all values of [t]. *)(** {1 Value Types} *)valt:tType.t(** [t] is the value type for {!t}. *)valcontents_t:contentsType.t(** [content_t] is the value type for {!contents}. *)valnode_t:nodeType.t(** [node_t] is the value type for {!node}. *)valcommit_t:commitType.t(** [commit_t] is the value type for {!commit}. *)valvalue_t:valueType.t(** [value_t] is the value type for {!value}. *)endmoduletypeSlice=sigmoduletypeS=S(** The signature for slices. *)(** Build simple slices. *)moduleMake(C:Contents.STORE)(N:Node.STORE)(H:Commit.STORE):Swithtypecontents=C.key*C.valueandtypenode=N.key*N.valueandtypecommit=H.key*H.valueend