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
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. | Dplist of (data * data) list
val pp_data : Ppx_deriving_runtime.Format.formatter -> data -> Ppx_deriving_runtime.unit
type code =
  1. | SEQ of code list
  2. | DROP of int
  3. | DUP
  4. | SWAP
  5. | DIG of int
  6. | DUG of int
  7. | PUSH of type_ * data
  8. | SOME
  9. | NONE of type_
  10. | UNIT
  11. | IF_NONE of code list * code list
  12. | PAIR
  13. | CAR
  14. | CDR
  15. | UNPAIR
  16. | LEFT of type_
  17. | RIGHT of type_
  18. | IF_LEFT of code list * code list
  19. | NIL of type_
  20. | CONS
  21. | IF_CONS of code list * code list
  22. | SIZE
  23. | EMPTY_SET of type_
  24. | EMPTY_MAP of type_ * type_
  25. | EMPTY_BIG_MAP of type_ * type_
  26. | MAP of code list
  27. | ITER of code list
  28. | MEM
  29. | GET
  30. | UPDATE
  31. | IF of code list * code list
  32. | LOOP of code list
  33. | LOOP_LEFT of code list
  34. | LAMBDA of type_ * type_ * code list
  35. | EXEC
  36. | DIP of int * code list
  37. | ASSERT_EQ
  38. | ASSERT_NEQ
  39. | ASSERT_LT
  40. | ASSERT_LE
  41. | ASSERT_GT
  42. | ASSERT_GE
  43. | FAILWITH
  44. | CAST
  45. | RENAME
  46. | CONCAT
  47. | SLICE
  48. | PACK
  49. | UNPACK of type_
  50. | ADD
  51. | SUB
  52. | MUL
  53. | EDIV
  54. | ABS
  55. | ISNAT
  56. | INT
  57. | NEG
  58. | LSL
  59. | LSR
  60. | OR
  61. | AND
  62. | XOR
  63. | NOT
  64. | COMPARE
  65. | EQ
  66. | NEQ
  67. | LT
  68. | GT
  69. | LE
  70. | GE
  71. | SELF
  72. | CONTRACT of type_ * Ident.ident option
  73. | TRANSFER_TOKENS
  74. | SET_DELEGATE
  75. | CREATE_ACCOUNT
  76. | CREATE_CONTRACT of code list
  77. | IMPLICIT_ACCOUNT
  78. | NOW
  79. | AMOUNT
  80. | BALANCE
  81. | CHECK_SIGNATURE
  82. | BLAKE2B
  83. | SHA256
  84. | SHA512
  85. | HASH_KEY
  86. | STEPS_TO_QUOTA
  87. | SOURCE
  88. | SENDER
  89. | ADDRESS
  90. | CHAIN_ID
val pp_code : Ppx_deriving_runtime.Format.formatter -> code -> Ppx_deriving_runtime.unit
type z_operator =
  1. | Znow
  2. | Zamount
  3. | Zbalance
  4. | Zsource
  5. | Zsender
  6. | Zaddress
  7. | Zchain_id
  8. | Zself_address
  9. | Znone of type_
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
type un_operator =
  1. | Ucar
  2. | Ucdr
  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. | Uhash_key
  18. | Ufail
  19. | Ucontract of type_ * Ident.ident option
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
type 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
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
type ter_operator =
  1. | Tcheck_signature
  2. | Tslice
  3. | Tupdate
  4. | Ttransfer_tokens
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
type cmp_operator =
  1. | Ceq
  2. | Cne
  3. | Cgt
  4. | Cge
  5. | Clt
  6. | Cle
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
type 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
val pp_builtin : Ppx_deriving_runtime.Format.formatter -> builtin -> Ppx_deriving_runtime.unit
val show_builtin : builtin -> Ppx_deriving_runtime.string
type 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. | IassignRec of Ident.ident * int * int * instruction
  7. | Iif of instruction * instruction * instruction * type_
  8. | Iifnone of instruction * instruction * Ident.ident * instruction
  9. | Iifcons of instruction * instruction * instruction
  10. | Iwhile of instruction * instruction
  11. | Iiter of Ident.ident list * instruction * instruction
  12. | Izop of z_operator
  13. | Iunop of un_operator * instruction
  14. | Ibinop of bin_operator * instruction * instruction
  15. | Iterop of ter_operator * instruction * instruction * instruction
  16. | Iconst of type_ * data
  17. | Icompare of cmp_operator * instruction * instruction
  18. | Iset of type_ * instruction list
  19. | Ilist of type_ * instruction list
  20. | Imap of type_ * type_ * (instruction * instruction) list
  21. | Irecord of instruction list
  22. | Irecupdate of instruction * int * (int * instruction) list
  23. | Ifold of Ident.ident * Ident.ident option * Ident.ident * instruction * instruction * instruction
  24. | Imichelson of instruction list * code * Ident.ident list
val pp_instruction : Ppx_deriving_runtime.Format.formatter -> instruction -> Ppx_deriving_runtime.unit
val show_instruction : instruction -> Ppx_deriving_runtime.string
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. storage_type : type_;
  2. storage_data : data;
  3. storage_list : (Ident.ident * type_) list;
  4. with_operations : bool;
  5. parameter : type_;
  6. funs : func list;
  7. entries : entry 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;
}
val pp_michelson : Ppx_deriving_runtime.Format.formatter -> michelson -> Ppx_deriving_runtime.unit
val show_michelson : michelson -> 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 : type_ -> data -> (Ident.ident * type_) list -> ?with_operations:bool -> type_ -> func list -> entry list -> ir
val mk_michelson : type_ -> type_ -> code -> michelson
val toperation : type_
val tunit : type_
val tstring : type_
val tnat : type_
val tint : type_
val tbool : type_
val tmutez : 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 icar : instruction -> instruction
val icdr : instruction -> instruction
val ifail : string -> instruction
val iskip : instruction
val ileft : type_ -> instruction -> instruction
val iright : type_ -> instruction -> 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 cmp_ident : Tools.String.t -> Tools.String.t -> bool
val cmp_type : type_ -> type_ -> bool
val cmp_data : data -> data -> bool
val cmp_code : code -> code -> bool
val cmp_builtin : builtin -> builtin -> bool
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
module Utils : sig ... end
OCaml

Innovation. Community. Security.