package tezos-protocol-001-PtCJ7pwo

  1. Overview
  2. Docs
Module type
Class type

Default annotations

val default_now_annot : Script_typed_ir.var_annot option
val default_amount_annot : Script_typed_ir.var_annot option
val default_balance_annot : Script_typed_ir.var_annot option
val default_steps_annot : Script_typed_ir.var_annot option
val default_source_annot : Script_typed_ir.var_annot option
val default_sender_annot : Script_typed_ir.var_annot option
val default_self_annot : Script_typed_ir.var_annot option
val default_arg_annot : Script_typed_ir.var_annot option
val default_param_annot : Script_typed_ir.var_annot option
val default_storage_annot : Script_typed_ir.var_annot option
val default_car_annot : Script_typed_ir.field_annot option
val default_cdr_annot : Script_typed_ir.field_annot option
val default_contract_annot : Script_typed_ir.field_annot option
val default_addr_annot : Script_typed_ir.field_annot option
val default_manager_annot : Script_typed_ir.field_annot option
val default_pack_annot : Script_typed_ir.field_annot option
val default_unpack_annot : Script_typed_ir.field_annot option
val default_elt_annot : Script_typed_ir.field_annot option
val default_key_annot : Script_typed_ir.field_annot option
val default_hd_annot : Script_typed_ir.field_annot option
val default_tl_annot : Script_typed_ir.field_annot option
val default_some_annot : Script_typed_ir.field_annot option
val default_left_annot : Script_typed_ir.field_annot option
val default_right_annot : Script_typed_ir.field_annot option
val default_binding_annot : Script_typed_ir.field_annot option

Unparse annotations to their string representation

val unparse_type_annot : Script_typed_ir.type_annot option -> string list
val unparse_var_annot : Script_typed_ir.var_annot option -> string list
val unparse_field_annot : Script_typed_ir.field_annot option -> string list

Convertions functions between different annotation kinds

val field_to_var_annot : Script_typed_ir.field_annot option -> Script_typed_ir.var_annot option
val type_to_var_annot : Script_typed_ir.type_annot option -> Script_typed_ir.var_annot option
val var_to_field_annot : Script_typed_ir.var_annot option -> Script_typed_ir.field_annot option
val default_annot : default:'a option -> 'a option -> 'a option

Replace an annotation by its default value if it is None

val gen_access_annot : Script_typed_ir.var_annot option -> ?default:Script_typed_ir.field_annot option -> Script_typed_ir.field_annot option -> Script_typed_ir.var_annot option

Generate annotation for field accesses, of the form @var.field1.field2

Merge type annotations.

  • returns

    an error Inconsistent_type_annotations if they are both present and different

Merge field annotations.

  • returns

    an error Inconsistent_type_annotations if they are both present and different

val merge_var_annot : Script_typed_ir.var_annot option -> Script_typed_ir.var_annot option -> Script_typed_ir.var_annot option

Merge variable annotations, does not fail (None if different).

val error_unexpected_annot : int -> 'a list -> unit Tezos_protocol_environment_001_PtCJ7pwo.Error_monad.tzresult
  • returns

    an error Unexpected_annotation in the monad the list is not empty.

Parse a type annotation only.

Parse a field annotation only.

Parse an annotation for composed types, of the form :ty_name %field in any order.

Parse an annotation for composed types, of the form :ty_name %field1 %field2 in any order.

Check that type annotations on constants are consistent

Extract and remove a field annotation from a node

Check that field annotations match, used for field accesses.

Instruction annotations parsing

Parse a variable annotation, replaced by a default value if None.

val parse_constr_annot : int -> ?if_special_first:Script_typed_ir.field_annot option -> ?if_special_second:Script_typed_ir.field_annot option -> string list -> (Script_typed_ir.var_annot option * Script_typed_ir.type_annot option * Script_typed_ir.field_annot option * Script_typed_ir.field_annot option) Tezos_protocol_environment_001_PtCJ7pwo.Error_monad.tzresult
val parse_destr_annot : int -> string list -> default_accessor:Script_typed_ir.field_annot option -> field_name:Script_typed_ir.field_annot option -> pair_annot:Script_typed_ir.var_annot option -> value_annot:Script_typed_ir.var_annot option -> (Script_typed_ir.var_annot option * Script_typed_ir.field_annot option) Tezos_protocol_environment_001_PtCJ7pwo.Error_monad.tzresult

Innovation. Community. Security.