Module Mini_c

module Types : sig ... end
module Formatter : sig ... end
include module type of struct include Types end
include module type of struct include Stage_common.Types end
module Location = Simple_utils.Location
module List = Simple_utils.List
module ValueVar : sig ... end
module TypeVar : sig ... end
module ModuleVar : sig ... end
include module type of struct include Stage_common.Enums end
type z = Z.t
val compare_z : z -> z -> Ppx_deriving_runtime.int
type ligo_string = Simple_utils.Ligo_string.t
val ligo_string_to_yojson : ligo_string -> Yojson.Safe.t
val ligo_string_of_yojson : Yojson.Safe.t -> ligo_string Ppx_deriving_yojson_runtime.error_or
val compare_ligo_string : ligo_string -> ligo_string -> Ppx_deriving_runtime.int
val hash_fold_ligo_string : Ppx_hash_lib.Std.Hash.state -> ligo_string -> Ppx_hash_lib.Std.Hash.state
val hash_ligo_string : ligo_string -> Ppx_hash_lib.Std.Hash.hash_value
val z_to_yojson : Z.t -> [> `String of string ]
val z_of_yojson : [> `String of string ] -> ( Z.t, string ) Core._result
val bytes_to_yojson : Core.Bytes.t -> [> `String of string ]
type layout =
| L_comb
| L_tree
val hash_fold_layout : Ppx_hash_lib.Std.Hash.state -> layout -> Ppx_hash_lib.Std.Hash.state
val hash_layout : layout -> Ppx_hash_lib.Std.Hash.hash_value
val hash_fold_bytes : Core.Hash.state -> Core.Bytes.t -> Core.Hash.state
val hash_fold_z : Core.Hash.state -> Z.t -> Core.Hash.state
type literal =
| Literal_unit
| Literal_int of z
| Literal_nat of z
| Literal_timestamp of z
| Literal_mutez of z
| Literal_string of ligo_string
| Literal_bytes of bytes
| Literal_address of string
| Literal_signature of string
| Literal_key of string
| Literal_key_hash of string
| Literal_chain_id of string
| Literal_operation of bytes
| Literal_bls12_381_g1 of bytes
| Literal_bls12_381_g2 of bytes
| Literal_bls12_381_fr of bytes
| Literal_chest of bytes
| Literal_chest_key of bytes
val literal_to_yojson : literal -> Yojson.Safe.t
val literal_of_yojson : Yojson.Safe.t -> literal Ppx_deriving_yojson_runtime.error_or
val compare_literal : literal -> literal -> Ppx_deriving_runtime.int
val hash_fold_literal : Ppx_hash_lib.Std.Hash.state -> literal -> Ppx_hash_lib.Std.Hash.state
val hash_literal : literal -> Ppx_hash_lib.Std.Hash.hash_value
val literal_to_enum : literal -> int
type constant' =
| C_UNIT
| C_NIL
| C_SOME
| C_NONE
| C_UNOPT
| C_UNOPT_WITH_ERROR
| C_ASSERT_INFERRED
| C_UPDATE
| C_ITER
| C_LOOP_LEFT
| C_LOOP_CONTINUE
| C_LOOP_STOP
| C_FOLD
| C_FOLD_LEFT
| C_FOLD_RIGHT
| C_NEG
| C_ADD
| C_SUB
| C_MUL
| C_DIV
| C_MOD
| C_NOT
| C_AND
| C_OR
| C_XOR
| C_LSL
| C_LSR
| C_EQ
| C_NEQ
| C_LT
| C_GT
| C_LE
| C_GE
| C_CONCAT
| C_BYTES_UNPACK
| C_CONS
| C_PAIR
| C_CAR
| C_CDR
| C_TRUE
| C_FALSE
| C_LEFT
| C_RIGHT
| C_SET_EMPTY
| C_SET_LITERAL
| C_SET_ADD
| C_SET_REMOVE
| C_SET_ITER
| C_SET_FOLD
| C_SET_FOLD_DESC
| C_SET_MEM
| C_SET_UPDATE
| C_LIST_EMPTY
| C_LIST_LITERAL
| C_LIST_ITER
| C_LIST_MAP
| C_LIST_FOLD
| C_LIST_FOLD_LEFT
| C_LIST_FOLD_RIGHT
| C_MAP
| C_MAP_EMPTY
| C_MAP_LITERAL
| C_MAP_GET
| C_MAP_GET_FORCE
| C_MAP_ADD
| C_MAP_REMOVE
| C_MAP_UPDATE
| C_MAP_ITER
| C_MAP_MAP
| C_MAP_FOLD
| C_MAP_FIND
| C_MAP_FIND_OPT
| C_MAP_GET_AND_UPDATE
| C_BIG_MAP
| C_BIG_MAP_EMPTY
| C_BIG_MAP_LITERAL
| C_BIG_MAP_GET_AND_UPDATE
| C_CALL
| C_CONTRACT
| C_CONTRACT_OPT
| C_CONTRACT_WITH_ERROR
| C_CONTRACT_ENTRYPOINT
| C_CONTRACT_ENTRYPOINT_OPT
| C_ADDRESS
| C_SELF
| C_SELF_ADDRESS
| C_IMPLICIT_ACCOUNT
| C_SET_DELEGATE
| C_CREATE_CONTRACT
| C_OPEN_CHEST
| C_VIEW
| C_TEST_SIZE
| C_TEST_ORIGINATE
| C_TEST_GET_STORAGE_OF_ADDRESS
| C_TEST_GET_BALANCE
| C_TEST_SET_SOURCE
| C_TEST_SET_BAKER
| C_TEST_EXTERNAL_CALL_TO_ADDRESS
| C_TEST_EXTERNAL_CALL_TO_ADDRESS_EXN
| C_TEST_GET_NTH_BS
| C_TEST_PRINT
| C_TEST_TO_STRING
| C_TEST_UNESCAPE_STRING
| C_TEST_STATE_RESET
| C_TEST_BOOTSTRAP_CONTRACT
| C_TEST_NTH_BOOTSTRAP_CONTRACT
| C_TEST_LAST_ORIGINATIONS
| C_TEST_MUTATE_VALUE
| C_TEST_MUTATION_TEST
| C_TEST_MUTATION_TEST_ALL
| C_TEST_SAVE_MUTATION
| C_TEST_RUN
| C_TEST_COMPILE_CONTRACT
| C_TEST_DECOMPILE
| C_TEST_TO_CONTRACT
| C_TEST_TO_ENTRYPOINT
| C_TEST_COMPILE_CONTRACT_FROM_FILE
| C_TEST_TO_TYPED_ADDRESS
| C_TEST_NTH_BOOTSTRAP_TYPED_ADDRESS
| C_TEST_SET_BIG_MAP
| C_TEST_CAST_ADDRESS
| C_TEST_CREATE_CHEST
| C_TEST_CREATE_CHEST_KEY
| C_TEST_RANDOM
| C_TEST_GENERATOR_EVAL
| C_TEST_ADD_ACCOUNT
| C_TEST_NEW_ACCOUNT
| C_TEST_BAKER_ACCOUNT
| C_TEST_REGISTER_DELEGATE
| C_TEST_BAKE_UNTIL_N_CYCLE_END
| C_TEST_GET_VOTING_POWER
| C_TEST_GET_TOTAL_VOTING_POWER
| C_TEST_REGISTER_CONSTANT
| C_TEST_CONSTANT_TO_MICHELSON
| C_TEST_REGISTER_FILE_CONSTANTS
| C_TEST_PUSH_CONTEXT
| C_TEST_POP_CONTEXT
| C_TEST_DROP_CONTEXT
| C_TEST_FAILWITH
| C_TEST_READ_CONTRACT_FROM_FILE
| C_TEST_SIGN
| C_TEST_GET_ENTRYPOINT
| C_TEST_LAST_EVENTS
| C_SAPLING_VERIFY_UPDATE
| C_SAPLING_EMPTY_STATE
| C_GLOBAL_CONSTANT
| C_EMIT_EVENT
| C_POLYMORPHIC_ADD
| C_POLYMORPHIC_SUB
| C_SUB_MUTEZ
| C_OPTION_MAP
val min_constant' : int
val max_constant' : int
val constant'_to_enum : constant' -> int
val constant'_of_enum : int -> constant' option
val constant'_to_yojson : constant' -> Yojson.Safe.t
val constant'_of_yojson : Yojson.Safe.t -> constant' Ppx_deriving_yojson_runtime.error_or
val pp_constant' : Stdlib.Format.formatter -> constant' -> unit
val ppx_is_only_interpreter : constant' -> bool
val read_constant' : string -> constant' option
type deprecated = {
name : string;
const : constant';
}
type rich_constant =
| Const of constant'
module SMap : sig ... end
type location = Location.t
type 'a location_wrap = 'a Location.wrap
type attributes = string list
type known_attributes = {
inline : bool;
no_mutation : bool;
view : bool;
public : bool;
hidden : bool;
}
val hash_fold_known_attributes : Ppx_hash_lib.Std.Hash.state -> known_attributes -> Ppx_hash_lib.Std.Hash.state
val hash_known_attributes : known_attributes -> Ppx_hash_lib.Std.Hash.hash_value
type expression_variable = ValueVar.t
val hash_fold_expression_variable : Ppx_hash_lib.Std.Hash.state -> expression_variable -> Ppx_hash_lib.Std.Hash.state
val hash_expression_variable : expression_variable -> Ppx_hash_lib.Std.Hash.hash_value
type type_variable = TypeVar.t
val hash_fold_type_variable : Ppx_hash_lib.Std.Hash.state -> type_variable -> Ppx_hash_lib.Std.Hash.state
val hash_type_variable : type_variable -> Ppx_hash_lib.Std.Hash.hash_value
type module_variable = ModuleVar.t
val hash_fold_module_variable : Ppx_hash_lib.Std.Hash.state -> module_variable -> Ppx_hash_lib.Std.Hash.state
val hash_module_variable : module_variable -> Ppx_hash_lib.Std.Hash.hash_value
type kind =
| Type
| Singleton
val kind_to_yojson : kind -> Yojson.Safe.t
val kind_of_yojson : Yojson.Safe.t -> kind Ppx_deriving_yojson_runtime.error_or
val _ : Yojson.Safe.t -> kind Ppx_deriving_yojson_runtime.error_or
val equal_kind : kind -> kind -> bool
val compare_kind : kind -> kind -> int
val hash_fold_kind : Ppx_hash_lib.Std.Hash.state -> kind -> Ppx_hash_lib.Std.Hash.state
val hash_kind : kind -> Ppx_hash_lib.Std.Hash.hash_value
type label =
| Label of string
val hash_fold_label : Ppx_hash_lib.Std.Hash.state -> label -> Ppx_hash_lib.Std.Hash.state
val hash_label : label -> Ppx_hash_lib.Std.Hash.hash_value
val label_to_yojson : label -> [> `List of [> `String of string ] list ]
val equal_label : label -> label -> bool
val compare_label : label -> label -> int
module LMap : sig ... end
type 'a label_map = 'a LMap.t
val hash_fold_label_map : 'a. ( Ppx_hash_lib.Std.Hash.state -> 'a -> Ppx_hash_lib.Std.Hash.state ) -> Ppx_hash_lib.Std.Hash.state -> 'a label_map -> Ppx_hash_lib.Std.Hash.state
val const_name : rich_constant -> constant'
type 'ty_expr row_element_mini_c = {
associated_type : 'ty_expr;
michelson_annotation : string option;
decl_pos : int;
}
val hash_fold_row_element_mini_c : 'ty_expr. ( Ppx_hash_lib.Std.Hash.state -> 'ty_expr -> Ppx_hash_lib.Std.Hash.state ) -> Ppx_hash_lib.Std.Hash.state -> 'ty_expr row_element_mini_c -> Ppx_hash_lib.Std.Hash.state
type 'ty_exp type_app = {
type_operator : type_variable;
arguments : 'ty_exp list;
}
val hash_fold_type_app : 'ty_exp. ( Ppx_hash_lib.Std.Hash.state -> 'ty_exp -> Ppx_hash_lib.Std.Hash.state ) -> Ppx_hash_lib.Std.Hash.state -> 'ty_exp type_app -> Ppx_hash_lib.Std.Hash.state
type 'ty_expr row_element = {
associated_type : 'ty_expr;
attributes : string list;
decl_pos : int;
}
type 'a module_access = {
module_path : module_variable list;
element : 'a;
}
val hash_fold_module_access : 'a. ( Ppx_hash_lib.Std.Hash.state -> 'a -> Ppx_hash_lib.Std.Hash.state ) -> Ppx_hash_lib.Std.Hash.state -> 'a module_access -> Ppx_hash_lib.Std.Hash.state
type 'ty_exp abstraction = {
ty_binder : type_variable;
kind : kind;
type_ : 'ty_exp;
}
val hash_fold_abstraction : 'ty_exp. ( Ppx_hash_lib.Std.Hash.state -> 'ty_exp -> Ppx_hash_lib.Std.Hash.state ) -> Ppx_hash_lib.Std.Hash.state -> 'ty_exp abstraction -> Ppx_hash_lib.Std.Hash.state
type 'ty_exp rows = {
fields : 'ty_exp row_element label_map;
attributes : string list;
}
type 'ty_exp arrow = {
type1 : 'ty_exp;
type2 : 'ty_exp;
}
val hash_fold_arrow : 'ty_exp. ( Ppx_hash_lib.Std.Hash.state -> 'ty_exp -> Ppx_hash_lib.Std.Hash.state ) -> Ppx_hash_lib.Std.Hash.state -> 'ty_exp arrow -> Ppx_hash_lib.Std.Hash.state
type binder_attributes = {
const_or_var : [ `Const | `Var ] option;
}
val hash_fold_binder_attributes : Ppx_hash_lib.Std.Hash.state -> binder_attributes -> Ppx_hash_lib.Std.Hash.state
val hash_binder_attributes : binder_attributes -> Ppx_hash_lib.Std.Hash.hash_value
type 'ty_exp binder = {
var : expression_variable;
ascr : 'ty_exp option;
attributes : binder_attributes;
}
val hash_fold_binder : 'ty_exp. ( Ppx_hash_lib.Std.Hash.state -> 'ty_exp -> Ppx_hash_lib.Std.Hash.state ) -> Ppx_hash_lib.Std.Hash.state -> 'ty_exp binder -> Ppx_hash_lib.Std.Hash.state
type 'exp application = {
lamb : 'exp;
args : 'exp;
}
type ('exp, 'ty_exp) lambda = {
binder : 'ty_exp binder;
output_type : 'ty_exp option;
result : 'exp;
}
type ('exp, 'ty_exp) recursive = {
fun_name : expression_variable;
fun_type : 'ty_exp;
lambda : ( 'exp, 'ty_exp ) lambda;
}
type ('exp, 'ty_exp) let_in = {
let_binder : 'ty_exp binder;
rhs : 'exp;
let_result : 'exp;
attributes : attributes;
}
type ('exp, 'ty_exp) type_in = {
type_binder : type_variable;
rhs : 'ty_exp;
let_result : 'exp;
}
type 'exp raw_code = {
language : string;
code : 'exp;
}
type 'exp constructor = {
constructor : label;
element : 'exp;
}
type 'exp access =
| Access_tuple of z
| Access_record of string
| Access_map of 'exp
type 'exp accessor = {
record : 'exp;
path : 'exp access list;
}
type 'exp update = {
record : 'exp;
path : 'exp access list;
update : 'exp;
}
type 'exp record_accessor = {
record : 'exp;
path : label;
}
type 'exp record_update = {
record : 'exp;
path : label;
update : 'exp;
}
type 'exp type_abs = {
type_binder : type_variable;
result : 'exp;
}
type ('exp, 'ty_exp) ascription = {
anno_expr : 'exp;
type_annotation : 'ty_exp;
}
type 'exp conditional = {
condition : 'exp;
then_clause : 'exp;
else_clause : 'exp;
}
and 'exp sequence = {
expr1 : 'exp;
expr2 : 'exp;
}
and ('exp, 'ty_exp) assign = {
binder : 'ty_exp binder;
expression : 'exp;
}
and 'exp for_ = {
binder : expression_variable;
start : 'exp;
final : 'exp;
incr : 'exp;
f_body : 'exp;
}
and 'exp for_each = {
fe_binder : expression_variable * expression_variable option;
collection : 'exp;
collection_type : collect_type;
fe_body : 'exp;
}
and collect_type =
| Map
| Set
| List
| Any
and 'exp while_loop = {
cond : 'exp;
body : 'exp;
}
type 'ty_exp list_pattern =
| Cons of 'ty_exp pattern * 'ty_exp pattern
| List of 'ty_exp pattern list
and 'ty_exp pattern_repr =
| P_unit
| P_var of 'ty_exp binder
| P_list of 'ty_exp list_pattern
| P_variant of label * 'ty_exp pattern
| P_tuple of 'ty_exp pattern list
| P_record of label list * 'ty_exp pattern list
and 'ty_exp pattern = 'ty_exp pattern_repr Location.wrap
type ('exp, 'ty_exp) match_case = {
pattern : 'ty_exp pattern;
body : 'exp;
}
type ('exp, 'ty_exp) match_exp = {
matchee : 'exp;
cases : ( 'exp, 'ty_exp ) match_case list;
}
type ('ty_exp, 'attr) declaration_type' = {
type_binder : type_variable;
type_expr : 'ty_exp;
type_attr : 'attr;
}
and ('exp, 'ty_exp, 'attr) declaration_constant' = {
binder : 'ty_exp binder;
expr : 'exp;
attr : 'attr;
}
and ('exp, 'ty_exp, 'attr_e, 'attr_t, 'attr_m) declaration_module' = {
module_binder : module_variable;
module_ : ( 'exp, 'ty_exp, 'attr_e, 'attr_t, 'attr_m ) module_expr';
module_attr : 'attr_m;
}
and ('exp, 'ty_exp, 'attr_e, 'attr_t, 'attr_m) declaration_content' =
| Declaration_type of ( 'ty_exp, 'attr_t ) declaration_type'
| Declaration_constant of ( 'exp, 'ty_exp, 'attr_e ) declaration_constant'
| Declaration_module of ( 'exp, 'ty_exp, 'attr_e, 'attr_t, 'attr_m ) declaration_module'
and ('exp, 'ty_exp, 'attr_e, 'attr_t, 'attr_m) declaration' = ( 'exp, 'ty_exp, 'attr_e, 'attr_t, 'attr_m ) declaration_content' location_wrap
and ('exp, 'ty_exp, 'attr_e, 'attr_t, 'attr_m) declarations' = ( 'exp, 'ty_exp, 'attr_e, 'attr_t, 'attr_m ) declaration' list
and ('exp, 'ty_exp, 'attr_e, 'attr_t, 'attr_m) mod_in' = {
module_binder : module_variable;
rhs : ( 'exp, 'ty_exp, 'attr_e, 'attr_t, 'attr_m ) module_expr';
let_result : 'exp;
}
and module_path_' = module_variable List.Ne.t
and ('exp, 'ty_exp, 'attr_e, 'attr_t, 'attr_m) module_expr_content' =
| M_struct of ( 'exp, 'ty_exp, 'attr_e, 'attr_t, 'attr_m ) declarations'
| M_variable of module_variable
| M_module_path of module_path_'
and ('exp, 'ty_exp, 'attr_e, 'attr_t, 'attr_m) module_expr' = ( 'exp, 'ty_exp, 'attr_e, 'attr_t, 'attr_m ) module_expr_content' Location.wrap
type 'a annotated = string option * 'a
type type_content =
| T_tuple of type_expression annotated list
| T_or of type_expression annotated * type_expression annotated
| T_function of type_expression * type_expression
| T_base of type_base
| T_map of type_expression * type_expression
| T_big_map of type_expression * type_expression
| T_list of type_expression
| T_set of type_expression
| T_contract of type_expression
| T_ticket of type_expression
| T_sapling_state of Z.t
| T_sapling_transaction of Z.t
| T_option of type_expression
and type_expression = {
type_content : type_content;
location : Location.t;
source_type : Ast_typed.type_expression option;
}
and type_base =
| TB_unit
| TB_bool
| TB_string
| TB_bytes
| TB_nat
| TB_int
| TB_mutez
| TB_operation
| TB_address
| TB_key
| TB_key_hash
| TB_chain_id
| TB_signature
| TB_timestamp
| TB_baker_hash
| TB_pvss_key
| TB_baker_operation
| TB_bls12_381_g1
| TB_bls12_381_g2
| TB_bls12_381_fr
| TB_never
| TB_chest
| TB_chest_key
| TB_tx_rollup_l2_address
and environment_element = expression_variable * type_expression
and environment = environment_element list
and var_name = expression_variable
and fun_name = expression_variable
type inline = bool
type value =
| D_unit
| D_bool of bool
| D_nat of Z.t
| D_timestamp of Z.t
| D_mutez of Z.t
| D_int of Z.t
| D_string of string
| D_bytes of bytes
| D_pair of value * value
| D_left of value
| D_right of value
| D_some of value
| D_none
| D_map of (value * value) list
| D_big_map of (value * value) list
| D_ticket of value * value
| D_list of value list
| D_set of value list
| D_operation of bytes
and selector = var_name list
and expression_content =
| E_literal of Stage_common.Types.literal
| E_closure of anon_function
| E_constant of constant
| E_application of expression * expression
| E_variable of var_name
| E_iterator of Stage_common.Types.constant' * (var_name * type_expression) * expression * expression
| E_fold of ((var_name * type_expression) * expression) * expression * expression
| E_fold_right of ((var_name * type_expression) * expression) * (expression * type_expression) * expression
| E_if_bool of expression * expression * expression
| E_if_none of expression * expression * (var_name * type_expression) * expression
| E_if_cons of expression * expression * ((var_name * type_expression) * (var_name * type_expression)) * expression
| E_if_left of expression * (var_name * type_expression) * expression * (var_name * type_expression) * expression
| E_let_in of expression * inline * (var_name * type_expression) * expression
| E_tuple of expression list
| E_let_tuple of expression * (var_name * type_expression) list * expression
| E_proj of expression * int * int
| E_update of expression * int * expression * int
| E_raw_michelson of ( Location.t, string ) Tezos_micheline.Micheline.node list
| E_global_constant of string * expression list
| E_create_contract of type_expression * type_expression * (var_name * type_expression) * expression * expression list
and expression = {
content : expression_content;
type_expression : type_expression;
location : Location.t;
}
and constant = {
cons_name : Stage_common.Types.constant';
arguments : expression list;
}
and anon_function = {
binder : expression_variable;
body : expression;
}
type binder_meta = {
location : Location.t;
name : string option;
source_type : Ast_typed.type_expression option;
}
type meta = {
location : Location.t;
env : binder_meta option list;
binder : binder_meta option;
}
val dummy_meta : meta
module PP : sig ... end
module Combinators : sig ... end
include module type of struct include Combinators end
module Expression : sig ... end
val get_bool : Types.value -> bool option
val get_int : Types.value -> Z.t option
val get_nat : Types.value -> Z.t option
val get_mutez : Types.value -> Z.t option
val get_timestamp : Types.value -> Z.t option
val get_string : Types.value -> string option
val get_bytes : Types.value -> bytes option
val get_unit : Types.value -> unit option
val get_option : Types.value -> Types.value option option
val get_map : Types.value -> (Types.value * Types.value) list option
val get_big_map : Types.value -> (Types.value * Types.value) list option
val get_list : Types.value -> Types.value list option
val get_set : Types.value -> Types.value list option
val get_function : Types.expression -> Types.anon_function option
val get_t_option : Types.type_expression -> Types.type_expression option
val get_pair : Types.value -> (Types.value * Types.value) option
val get_t_tuple : Types.type_expression -> Types.type_expression list option
val get_t_list : Types.type_expression -> Types.type_expression option
val get_t_collection : Types.type_expression -> Types.type_expression option
val get_left : Types.value -> Types.value option
val get_right : Types.value -> Types.value option
val get_ticket : Types.value -> (Types.value * Types.value) option
val get_or : Types.value -> (bool * Types.value) option
val get_t_left : Types.type_expression -> Types.type_expression option
val get_t_right : Types.type_expression -> Types.type_expression option
val get_t_contract : Types.type_expression -> Types.type_expression option
val get_t_operation : Types.type_expression -> Types.type_expression option
val get_t_sapling_state : Types.type_expression -> Z.t option
val get_operation : Types.value -> bytes option
val t_int : ?loc:Types.Location.t -> unit -> Types.type_expression
val t_unit : ?loc:Types.Location.t -> unit -> Types.type_expression
val t_nat : ?loc:Types.Location.t -> unit -> Types.type_expression
val e_unit : ?loc:Types.Location.t -> unit -> Expression.t
val d_unit : Types.value
module Environment : sig ... end
module Free_variables : sig ... end