package tezos-protocol-015-PtLimaPt
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b
doc/tezos-protocol-015-PtLimaPt.raw/Tezos_raw_protocol_015_PtLimaPt/Script_map/index.html
Module Tezos_raw_protocol_015_PtLimaPt.Script_map
Source
Functions to ease the manipulation of Michelson maps.
A map in Michelson is a type-homegeneous, partial function of keys to values, along with the functions that operate on the structure (through a first-class module).
val make :
(module Script_typed_ir.Boxed_map
with type key = 'key
and type value = 'value) ->
('key, 'value) Script_typed_ir.map
val get_module :
('key, 'value) Script_typed_ir.map ->
(module Script_typed_ir.Boxed_map
with type key = 'key
and type value = 'value)
empty cmp_ty
creates a map module where keys have size Gas_comparable_input_size.size_of_comparable_value cmp_ty
and are compared with Script_comparable.compare_comparable cmp_ty
(used for sorting keys, which ensures a reasonable complexity of the map functions). The function returns an empty map packaged as a first-class map module.
empty_from map
creates an empty map module where the size of keys and the comparison function are those of map
.
val fold :
('key -> 'value -> 'acc -> 'acc) ->
('key, 'value) Script_typed_ir.map ->
'acc ->
'acc
val fold_es :
('key ->
'value ->
'acc ->
'acc Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.t) ->
('key, 'value) Script_typed_ir.map ->
'acc ->
'acc Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.t
update k (Some v) map
associates v
to k
in map
(overwriting the previous value, if any), and update k None map
removes the potential association to k
in map
.
val map_es_in_context :
('context ->
'key ->
'value1 ->
('value2 * 'context)
Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.t) ->
'context ->
('key, 'value1) Script_typed_ir.map ->
(('key, 'value2) Script_typed_ir.map * 'context)
Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
Tezos_protocol_environment_015_PtLimaPt.Lwt.t