ligo/lib_embedded_protocol_alpha/src/storage_functors.mli

50 lines
1.8 KiB
OCaml
Raw Normal View History

2016-09-08 21:13:10 +04:00
(**************************************************************************)
(* *)
2017-11-14 03:36:14 +04:00
(* Copyright (c) 2014 - 2017. *)
2016-09-08 21:13:10 +04:00
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
(* *)
(* All rights reserved. No warranty, explicit or implicit, provided. *)
(* *)
(**************************************************************************)
(** Tezos Protocol Implementation - Typed storage builders. *)
2016-09-08 21:13:10 +04:00
open Storage_sigs
module type ENCODED_VALUE = sig
type t
val encoding: t Data_encoding.t
2016-09-08 21:13:10 +04:00
end
module Make_value (V : ENCODED_VALUE) : VALUE with type t = V.t
2016-09-08 21:13:10 +04:00
module Raw_value : VALUE with type t = MBytes.t
2016-09-08 21:13:10 +04:00
module Make_subcontext (C : Raw_context.T) (N : NAME)
: Raw_context.T with type t = C.t
2016-09-08 21:13:10 +04:00
module Make_single_data_storage (C : Raw_context.T) (N : NAME) (V : VALUE)
: Single_data_storage with type t = C.t
and type value = V.t
2016-09-08 21:13:10 +04:00
module type INDEX = sig
type t
val path_length: int
val to_path: t -> string list -> string list
val of_path: string list -> t option
2016-09-08 21:13:10 +04:00
end
module Pair(I1 : INDEX)(I2 : INDEX) : INDEX with type t = I1.t * I2.t
2016-09-08 21:13:10 +04:00
module Make_data_set_storage (C : Raw_context.T) (I : INDEX)
: Data_set_storage with type t = C.t and type elt = I.t
2016-09-08 21:13:10 +04:00
module Make_indexed_data_storage (C : Raw_context.T) (I : INDEX) (V : VALUE)
: Indexed_data_storage with type t = C.t
and type key = I.t
and type value = V.t
module Make_indexed_subcontext (C : Raw_context.T) (I : INDEX)
: Indexed_raw_context with type t = C.t
and type key = I.t