Mavryk_raw_protocol_alpha.Script_reprDefines a Michelson expression representation as a Micheline node with canonical (int) location and Michelson_v1_primitives.prim as content.
Types expr and node both define representation of Michelson expressions and are indeed the same type internally, although this is not visible outside Micheline due to interface abstraction.
type location = Mavryk_protocol_environment_alpha.Micheline.canonical_locationLocations are used by Micheline mostly for error-reporting and pretty- printing expressions. canonical_location is simply an int.
type annot = Mavryk_protocol_environment_alpha.Micheline.annotAnnotations attached to Michelson expressions.
Represents a Michelson expression as canonical Micheline.
type lazy_expr = expr Mavryk_protocol_environment_alpha.Data_encoding.lazy_tA record containing either an underlying serialized representation of an expression or a deserialized one, or both. If either is absent, it will be computed on-demand.
type 'location michelson_node =
('location, Michelson_v1_primitives.prim)
Mavryk_protocol_environment_alpha.Micheline.nodetype node = location michelson_nodeSame as expr, but used in different contexts, as required by Micheline's abstract interface.
val location_encoding :
location Mavryk_protocol_environment_alpha.Data_encoding.tval expr_encoding : expr Mavryk_protocol_environment_alpha.Data_encoding.tval lazy_expr_encoding :
lazy_expr Mavryk_protocol_environment_alpha.Data_encoding.tType t joins the contract's code and storage in a single record.
val encoding : t Mavryk_protocol_environment_alpha.Data_encoding.encodingval deserialization_cost_estimated_from_bytes : int -> Gas_limit_repr.costval deserialized_cost : expr -> Gas_limit_repr.costval bytes_node_cost : bytes -> Gas_limit_repr.costval force_decode_cost : lazy_expr -> Gas_limit_repr.costReturns (a lower bound on) the cost to deserialize a lazy_expr. If the expression has already been deserialized (i.e. the lazy expression contains the deserialized value or both the bytes representation and the deserialized value) then the cost is free.
val stable_force_decode_cost : lazy_expr -> Gas_limit_repr.costLike force_decode_cost, excepted that the returned cost does not depend on the internal state of the lazy_expr. This means that the cost is never free (excepted for zero bytes expressions).
val force_decode :
lazy_expr ->
expr Mavryk_protocol_environment_alpha.Error_monad.tzresultval force_bytes_cost : lazy_expr -> Gas_limit_repr.costReturns the cost to serialize a lazy_expr. If the expression has already been deserialized (i.e. le lazy expression contains the bytes representation or both the bytes representation and the deserialized value) then the cost is free.
val force_bytes :
lazy_expr ->
bytes Mavryk_protocol_environment_alpha.Error_monad.tzresultval unit : exprval unit_parameter : lazy_exprval is_unit : expr -> boolval is_unit_parameter : lazy_expr -> boolval strip_locations_cost : _ michelson_node -> Gas_limit_repr.costval strip_annotations_cost : node -> Gas_limit_repr.costval micheline_serialization_cost : expr -> Gas_limit_repr.costComputes the cost of serializing a given term.
module Micheline_size : sig ... endval micheline_nodes : node -> intmicheline_nodes root returns the number of internal nodes in the micheline expression held from root.
val fold :
('loc, 'prim) Mavryk_protocol_environment_alpha.Micheline.node ->
'acc ->
('acc ->
('loc, 'prim) Mavryk_protocol_environment_alpha.Micheline.node ->
'acc) ->
'accfold node i f traverses node applying f on an accumulator initialized by i.