package archetype

  1. Overview
  2. Docs
type 'a with_annot = {
  1. node : 'a;
  2. annotation : Ident.ident option;
}
val pp_with_annot : 'a. (Ppx_deriving_runtime.Format.formatter -> 'a -> Ppx_deriving_runtime.unit) -> Ppx_deriving_runtime.Format.formatter -> 'a with_annot -> Ppx_deriving_runtime.unit
val show_with_annot : 'a. (Ppx_deriving_runtime.Format.formatter -> 'a -> Ppx_deriving_runtime.unit) -> 'a with_annot -> Ppx_deriving_runtime.string
type type_node =
  1. | Taddress
  2. | Tbig_map of type_ * type_
  3. | Tbool
  4. | Tbytes
  5. | Tchain_id
  6. | Tcontract of type_
  7. | Tint
  8. | Tkey
  9. | Tkey_hash
  10. | Tlambda of type_ * type_
  11. | Tlist of type_
  12. | Tmap of type_ * type_
  13. | Tmutez
  14. | Tnat
  15. | Toperation
  16. | Toption of type_
  17. | Tor of type_ * type_
  18. | Tpair of type_ * type_
  19. | Tset of type_
  20. | Tsignature
  21. | Tstring
  22. | Ttimestamp
  23. | Tunit
  24. | Tticket of type_
  25. | Tsapling_state of int
  26. | Tsapling_transaction of int
  27. | Tbls12_381_fr
  28. | Tbls12_381_g1
  29. | Tbls12_381_g2
  30. | Tnever
and type_ = type_node with_annot
val pp_type_node : Ppx_deriving_runtime.Format.formatter -> type_node -> Ppx_deriving_runtime.unit
val show_type_node : type_node -> Ppx_deriving_runtime.string
val pp_type_ : Ppx_deriving_runtime.Format.formatter -> type_ -> Ppx_deriving_runtime.unit
type data =
  1. | Dint of Core.big_int
  2. | Dstring of string
  3. | Dbytes of string
  4. | Dunit
  5. | Dtrue
  6. | Dfalse
  7. | Dpair of data * data
  8. | Dleft of data
  9. | Dright of data
  10. | Dsome of data
  11. | Dnone
  12. | Dlist of data list
  13. | Delt of data * data
  14. | Dvar of Ident.ident * type_
  15. | DIrCode of Ident.ident * instruction
  16. | Dcode of code
and code =
  1. | SEQ of code list
  2. | APPLY
  3. | EXEC
  4. | FAILWITH
  5. | IF of code list * code list
  6. | IF_CONS of code list * code list
  7. | IF_LEFT of code list * code list
  8. | IF_NONE of code list * code list
  9. | ITER of code list
  10. | LAMBDA of type_ * type_ * code list
  11. | LOOP of code list
  12. | LOOP_LEFT of code list
  13. | DIG of int
  14. | DIP of int * code list
  15. | DROP of int
  16. | DUG of int
  17. | DUP
  18. | PUSH of type_ * data
  19. | SWAP
  20. | ABS
  21. | ADD
  22. | COMPARE
  23. | EDIV
  24. | EQ
  25. | GE
  26. | GT
  27. | INT
  28. | ISNAT
  29. | LE
  30. | LSL
  31. | LSR
  32. | LT
  33. | MUL
  34. | NEG
  35. | NEQ
  36. | SUB
  37. | AND
  38. | NOT
  39. | OR
  40. | XOR
  41. | BLAKE2B
  42. | CHECK_SIGNATURE
  43. | HASH_KEY
  44. | SHA256
  45. | SHA512
  46. | ADDRESS
  47. | AMOUNT
  48. | BALANCE
  49. | CHAIN_ID
  50. | CONTRACT of type_ * Ident.ident option
  51. | CREATE_CONTRACT of type_ * type_ * code
  52. | IMPLICIT_ACCOUNT
  53. | NOW
  54. | SELF of Ident.ident option
  55. | SENDER
  56. | SET_DELEGATE
  57. | SOURCE
  58. | TRANSFER_TOKENS
  59. | CAR of int
  60. | CDR of int
  61. | CONCAT
  62. | CONS
  63. | EMPTY_BIG_MAP of type_ * type_
  64. | EMPTY_MAP of type_ * type_
  65. | EMPTY_SET of type_
  66. | GET
  67. | LEFT of type_
  68. | MAP of code list
  69. | MEM
  70. | NIL of type_
  71. | NONE of type_
  72. | PACK
  73. | PAIR
  74. | RIGHT of type_
  75. | SIZE
  76. | SLICE
  77. | SOME
  78. | UNIT
  79. | UNPACK of type_
  80. | UPDATE
  81. | JOIN_TICKETS
  82. | READ_TICKET
  83. | SPLIT_TICKET
  84. | TICKET
  85. | UNPAIR
  86. | SELF_ADDRESS
  87. | CAST of type_
  88. | CREATE_ACCOUNT
  89. | RENAME
  90. | STEPS_TO_QUOTA
  91. | LEVEL
  92. | SAPLING_EMPTY_STATE of int
  93. | SAPLING_VERIFY_UPDATE
  94. | NEVER
  95. | VOTING_POWER
  96. | TOTAL_VOTING_POWER
  97. | KECCAK
  98. | SHA3
  99. | PAIRING_CHECK
  100. | SUBMIT_PROPOSALS
  101. | SUBMIT_BALLOT
  102. | SET_BAKER_ACTIVE
  103. | TOGGLE_BAKER_DELEGATIONS
  104. | SET_BAKER_CONSENSUS_KEY
  105. | SET_BAKER_PVSS_KEY
and z_operator =
  1. | Znow
  2. | Zamount
  3. | Zbalance
  4. | Zsource
  5. | Zsender
  6. | Zaddress
  7. | Zchain_id
  8. | Zself of Ident.ident option
  9. | Zself_address
  10. | Znone of type_
  11. | Zunit
  12. | Znil of type_
  13. | Zemptyset of type_
  14. | Zemptymap of type_ * type_
  15. | Zemptybigmap of type_ * type_
  16. | Ztotalvotingpower
  17. | Zlevel
  18. | Zsapling_empty_state of int
and un_operator =
  1. | Ucar of int
  2. | Ucdr of int
  3. | Uleft of type_
  4. | Uright of type_
  5. | Uneg
  6. | Uint
  7. | Unot
  8. | Uabs
  9. | Uisnat
  10. | Usome
  11. | Usize
  12. | Upack
  13. | Uunpack of type_
  14. | Ublake2b
  15. | Usha256
  16. | Usha512
  17. | Usha3
  18. | Ukeccak
  19. | Uhash_key
  20. | Ufail
  21. | Ucontract of type_ * Ident.ident option
  22. | Usetdelegate
  23. | Uimplicitaccount
  24. | Ueq
  25. | Une
  26. | Ugt
  27. | Uge
  28. | Ult
  29. | Ule
  30. | Uvotingpower
  31. | Ureadticket
  32. | Ujointickets
  33. | Upairing_check
  34. | Uconcat
  35. | Uaddress
and bin_operator =
  1. | Badd
  2. | Bsub
  3. | Bmul
  4. | Bediv
  5. | Blsl
  6. | Blsr
  7. | Bor
  8. | Band
  9. | Bxor
  10. | Bcompare
  11. | Bget
  12. | Bmem
  13. | Bconcat
  14. | Bcons
  15. | Bpair
  16. | Bexec
  17. | Bapply
  18. | Bcreateticket
  19. | Bsplitticket
  20. | Bsapling_verify_update
and ter_operator =
  1. | Tcheck_signature
  2. | Tslice
  3. | Tupdate
  4. | Ttransfer_tokens
and cmp_operator =
  1. | Ceq
  2. | Cne
  3. | Cgt
  4. | Cge
  5. | Clt
  6. | Cle
and builtin =
  1. | Bmin of type_
  2. | Bmax of type_
  3. | Bfloor
  4. | Bceil
  5. | BlistContains of type_
  6. | BlistNth of type_
  7. | Btostring of type_
  8. | Bratcmp
  9. | Bratnorm
  10. | Brataddsub
  11. | Bratdiv
  12. | Bratmul
  13. | Bratuminus
  14. | Bratabs
  15. | Brattez
  16. | Bratdur
  17. | Bsubnat
  18. | Bmuteztonat
and instruction =
  1. | Iseq of instruction list
  2. | IletIn of Ident.ident * instruction * instruction * bool
  3. | Ivar of Ident.ident
  4. | Icall of Ident.ident * instruction list * bool
  5. | Iassign of Ident.ident * instruction
  6. | Iif of instruction * instruction * instruction * type_
  7. | Iifnone of instruction * instruction * Ident.ident * instruction * type_
  8. | Iifleft of instruction * Ident.ident * instruction * Ident.ident * instruction * type_
  9. | Iifcons of instruction * Ident.ident * Ident.ident * instruction * instruction * type_
  10. | Iloop of instruction * instruction
  11. | Iiter of Ident.ident list * instruction * instruction
  12. | Iloopleft of instruction * Ident.ident * instruction
  13. | Ilambda of type_ * Ident.ident * type_ * instruction
  14. | Izop of z_operator
  15. | Iunop of un_operator * instruction
  16. | Ibinop of bin_operator * instruction * instruction
  17. | Iterop of ter_operator * instruction * instruction * instruction
  18. | Iupdate of ukind * aoperator
  19. | Iconst of type_ * data
  20. | Icompare of cmp_operator * instruction * instruction
  21. | Iset of type_ * instruction list
  22. | Ilist of type_ * instruction list
  23. | Imap of bool * type_ * type_ * (instruction * instruction) list
  24. | Irecord of ritem
  25. | Irecupdate of instruction * ruitem
  26. | Imap_ of instruction * Ident.ident * instruction
  27. | Ifold of Ident.ident * Ident.ident option * Ident.ident * instruction * instruction * instruction
  28. | Imichelson of instruction list * code * Ident.ident list
and ritem =
  1. | Rtuple of instruction list
  2. | Rnodes of ritem list
and ruitem =
  1. | RUnodes of int * (int * ruitem) list
  2. | RUassign of int * (int * instruction) list
and aoperator =
  1. | Aunop of un_operator
  2. | Abinop of bin_operator * instruction
  3. | Aterop of ter_operator * instruction * instruction
and ukind =
  1. | Uvar of Ident.ident
  2. | Urec of Ident.ident * (int * int) list
val pp_data : Ppx_deriving_runtime.Format.formatter -> data -> Ppx_deriving_runtime.unit
val pp_code : Ppx_deriving_runtime.Format.formatter -> code -> Ppx_deriving_runtime.unit
val pp_z_operator : Ppx_deriving_runtime.Format.formatter -> z_operator -> Ppx_deriving_runtime.unit
val show_z_operator : z_operator -> Ppx_deriving_runtime.string
val pp_un_operator : Ppx_deriving_runtime.Format.formatter -> un_operator -> Ppx_deriving_runtime.unit
val show_un_operator : un_operator -> Ppx_deriving_runtime.string
val pp_bin_operator : Ppx_deriving_runtime.Format.formatter -> bin_operator -> Ppx_deriving_runtime.unit
val show_bin_operator : bin_operator -> Ppx_deriving_runtime.string
val pp_ter_operator : Ppx_deriving_runtime.Format.formatter -> ter_operator -> Ppx_deriving_runtime.unit
val show_ter_operator : ter_operator -> Ppx_deriving_runtime.string
val pp_cmp_operator : Ppx_deriving_runtime.Format.formatter -> cmp_operator -> Ppx_deriving_runtime.unit
val show_cmp_operator : cmp_operator -> Ppx_deriving_runtime.string
val pp_builtin : Ppx_deriving_runtime.Format.formatter -> builtin -> Ppx_deriving_runtime.unit
val show_builtin : builtin -> Ppx_deriving_runtime.string
val pp_instruction : Ppx_deriving_runtime.Format.formatter -> instruction -> Ppx_deriving_runtime.unit
val show_instruction : instruction -> Ppx_deriving_runtime.string
val pp_ritem : Ppx_deriving_runtime.Format.formatter -> ritem -> Ppx_deriving_runtime.unit
val pp_ruitem : Ppx_deriving_runtime.Format.formatter -> ruitem -> Ppx_deriving_runtime.unit
val show_ruitem : ruitem -> Ppx_deriving_runtime.string
val pp_aoperator : Ppx_deriving_runtime.Format.formatter -> aoperator -> Ppx_deriving_runtime.unit
val show_aoperator : aoperator -> Ppx_deriving_runtime.string
val pp_ukind : Ppx_deriving_runtime.Format.formatter -> ukind -> Ppx_deriving_runtime.unit
type implem =
  1. | Concrete of (Ident.ident * type_) list * instruction
  2. | Abstract of builtin
val pp_implem : Ppx_deriving_runtime.Format.formatter -> implem -> Ppx_deriving_runtime.unit
val show_implem : implem -> Ppx_deriving_runtime.string
type func = {
  1. name : Ident.ident;
  2. targ : type_;
  3. tret : type_;
  4. body : implem;
}
val pp_func : Ppx_deriving_runtime.Format.formatter -> func -> Ppx_deriving_runtime.unit
type entry = {
  1. name : Ident.ident;
  2. args : (Ident.ident * type_) list;
  3. eargs : (Ident.ident * type_) list;
  4. body : instruction;
}
val pp_entry : Ppx_deriving_runtime.Format.formatter -> entry -> Ppx_deriving_runtime.unit
type ir = {
  1. name : Ident.ident;
  2. storage_type : type_;
  3. storage_data : data;
  4. storage_list : (Ident.ident * type_ * data) list;
  5. with_operations : bool;
  6. parameter : type_;
  7. funs : func list;
  8. entries : entry list;
  9. parameters : Ident.ident list;
}
val pp_ir : Ppx_deriving_runtime.Format.formatter -> ir -> Ppx_deriving_runtime.unit
type michelson = {
  1. storage : type_;
  2. parameter : type_;
  3. code : code;
  4. parameters : Ident.ident list;
}
val pp_michelson : Ppx_deriving_runtime.Format.formatter -> michelson -> Ppx_deriving_runtime.unit
val show_michelson : michelson -> Ppx_deriving_runtime.string
type prim = {
  1. prim : Ident.ident;
  2. args : obj_micheline list;
  3. annots : Ident.ident list;
}
and obj_micheline =
  1. | Oprim of prim
  2. | Ostring of string
  3. | Obytes of string
  4. | Oint of string
  5. | Oarray of obj_micheline list
  6. | Ovar of obj_micheline_var
and obj_micheline_var =
  1. | OMVfree of Ident.ident
  2. | OMVint of Ident.ident
  3. | OMVstring of Ident.ident
  4. | OMVbytes of Ident.ident
  5. | OMVif of Ident.ident * obj_micheline * obj_micheline
val pp_prim : Ppx_deriving_runtime.Format.formatter -> prim -> Ppx_deriving_runtime.unit
val pp_obj_micheline : Ppx_deriving_runtime.Format.formatter -> obj_micheline -> Ppx_deriving_runtime.unit
val show_obj_micheline : obj_micheline -> Ppx_deriving_runtime.string
val pp_obj_micheline_var : Ppx_deriving_runtime.Format.formatter -> obj_micheline_var -> Ppx_deriving_runtime.unit
val show_obj_micheline_var : obj_micheline_var -> Ppx_deriving_runtime.string
type micheline = {
  1. code : obj_micheline list;
  2. storage : obj_micheline;
  3. parameters : Ident.ident list;
}
val pp_micheline : Ppx_deriving_runtime.Format.formatter -> micheline -> Ppx_deriving_runtime.unit
val show_micheline : micheline -> Ppx_deriving_runtime.string
type alpha_ident = int
val pp_alpha_ident : Ppx_deriving_runtime.Format.formatter -> alpha_ident -> Ppx_deriving_runtime.unit
val show_alpha_ident : alpha_ident -> Ppx_deriving_runtime.string
type dexpr =
  1. | Dalpha of alpha_ident
  2. | Dvar of type_
  3. | Dstorage of type_
  4. | Doperations
  5. | Dlbdparam
  6. | Dlbdresult
  7. | Ddata of data
  8. | Dzop of z_operator
  9. | Duop of un_operator * dexpr
  10. | Dbop of bin_operator * dexpr * dexpr
  11. | Dtop of ter_operator * dexpr * dexpr * dexpr
  12. | Dapply of dexpr * dexpr
  13. | Dexec of dexpr * dexpr
  14. | Dlambda of type_ * type_ * dinstruction list
  15. | Dloopleft of dexpr * dinstruction list
  16. | Dmap of dexpr * dinstruction list
and dinstruction =
  1. | Ddecl of alpha_ident * dexpr option
  2. | Dassign of dexpr * dexpr
  3. | Dfail of dexpr
  4. | Dif of dexpr * dinstruction list * dinstruction list
  5. | Difcons of dexpr * alpha_ident * alpha_ident * dinstruction list * dinstruction list
  6. | Difleft of dexpr * alpha_ident * dinstruction list * alpha_ident * dinstruction list
  7. | Difnone of dexpr * dinstruction list * alpha_ident * dinstruction list
  8. | Dloop of dexpr * dinstruction list
  9. | Diter of dexpr * dinstruction list
val pp_dexpr : Ppx_deriving_runtime.Format.formatter -> dexpr -> Ppx_deriving_runtime.unit
val pp_dinstruction : Ppx_deriving_runtime.Format.formatter -> dinstruction -> Ppx_deriving_runtime.unit
val show_dinstruction : dinstruction -> Ppx_deriving_runtime.string
type dprogram = {
  1. name : Ident.ident;
  2. storage : type_;
  3. parameter : type_;
  4. storage_data : data;
  5. code : dinstruction list;
}
val pp_dprogram : Ppx_deriving_runtime.Format.formatter -> dprogram -> Ppx_deriving_runtime.unit
val show_dprogram : dprogram -> Ppx_deriving_runtime.string
val mk_type : ?annotation:Ident.ident -> type_node -> type_
val mk_func : Ident.ident -> type_ -> type_ -> implem -> func
val mk_entry : Ident.ident -> (Ident.ident * type_) list -> (Ident.ident * type_) list -> instruction -> entry
val mk_ir : ?parameters:Ident.ident list -> Ident.ident -> type_ -> data -> (Ident.ident * type_ * data) list -> ?with_operations:bool -> type_ -> func list -> entry list -> ir
val mk_michelson : ?parameters:Ident.ident list -> type_ -> type_ -> code -> michelson
val mk_prim : ?args:obj_micheline list -> ?annots:Ident.ident list -> Ident.ident -> prim
val mk_micheline : ?parameters:Ident.ident list -> obj_micheline list -> obj_micheline -> micheline
val mk_dprogram : type_ -> type_ -> data -> Ident.ident -> dinstruction list -> dprogram
val toperation : type_
val tunit : type_
val tstring : type_
val tnat : type_
val tint : type_
val tbool : type_
val tmutez : type_
val taddress : type_
val ttimestamp : type_
val tbytes : type_
val tpair : type_ -> type_ -> type_
val tor : type_ -> type_ -> type_
val trat : type_
val tlist : type_ -> type_
val tset : type_ -> type_
val tmap : type_ -> type_ -> type_
val tlambda : type_ -> type_ -> type_
val itrue : instruction
val ifalse : instruction
val istring : string -> instruction
val imutez : Core.big_int -> instruction
val isome : instruction -> instruction
val inone : type_ -> instruction
val iunit : instruction
val inil : type_ -> instruction
val iemptyset : type_ -> instruction
val iemptymap : type_ -> type_ -> instruction
val iemptybigmap : type_ -> type_ -> instruction
val icar : int -> instruction -> instruction
val icdr : int -> instruction -> instruction
val ifail : string -> instruction
val iskip : instruction
val ileft : type_ -> instruction -> instruction
val iright : type_ -> instruction -> instruction
val irecord : ritem -> instruction
val isrecord : instruction list -> instruction
val ctrue : code
val cfalse : code
val cint : Core.big_int -> code
val cnat : Core.big_int -> code
val cstring : string -> code
val cfail : string -> code
val cskip : code
val dalpha : alpha_ident -> dexpr
val cmp_ident : Tools.String.t -> Tools.String.t -> bool
val cmp_type : type_ -> type_ -> bool
val cmp_data : data -> data -> bool
val cmp_z_operator : z_operator -> z_operator -> bool
val cmp_un_operator : un_operator -> un_operator -> bool
val cmp_bin_operator : bin_operator -> bin_operator -> bool
val cmp_ter_operator : ter_operator -> ter_operator -> bool
val cmp_code : code -> code -> bool
val cmp_builtin : builtin -> builtin -> bool
val map_type : (type_ -> type_) -> type_ -> type_
val map_data : (data -> data) -> data -> data
val map_code_gen : (code -> code) -> (data -> data) -> (type_ -> type_) -> code -> code
val map_code : (code -> code) -> code -> code
val map_seq : (code list -> code list) -> code -> code
val cmp_dexpr : dexpr -> dexpr -> bool
val cmp_dinstruction : dinstruction -> dinstruction -> bool
val map_dexpr : (dexpr -> dexpr) -> (dinstruction -> dinstruction) -> (alpha_ident -> alpha_ident) -> dexpr -> dexpr
val map_dexpr_dinstr : (dinstruction -> dinstruction) -> (dexpr -> dexpr) -> (alpha_ident -> alpha_ident) -> dinstruction -> dinstruction
val fold_dexpr : ('a -> dexpr -> 'a) -> ('a -> dinstruction -> 'a) -> 'a -> dexpr -> 'a
val fold_dexpr_dinstr : ('a -> dinstruction -> 'a) -> ('a -> dexpr -> 'a) -> 'a -> dinstruction -> 'a
module Utils : sig ... end
val to_type : obj_micheline -> type_
val to_data : obj_micheline -> data
OCaml

Innovation. Community. Security.