package archetype

  1. Overview
  2. Docs
val show_lident : lident -> Ppx_deriving_runtime.string
type namespace = lident
val show_namespace : namespace -> Ppx_deriving_runtime.string
type longident = namespace * lident
val show_longident : longident -> Ppx_deriving_runtime.string
val unloc_longident : longident -> Ident.ident * Ident.ident
val cmp_longident : longident -> longident -> bool
val pp_ident : Format.formatter -> string -> unit
val pp_lident : Format.formatter -> string Location.loced -> unit
type container =
  1. | Collection
  2. | Aggregate
  3. | Partition
  4. | AssetContainer
  5. | AssetKey
  6. | AssetValue
  7. | AssetView
val show_container : container -> Ppx_deriving_runtime.string
type currency =
  1. | Utz
val show_currency : currency -> Ppx_deriving_runtime.string
type vtyp =
  1. | VTunit
  2. | VTbool
  3. | VTnat
  4. | VTint
  5. | VTrational
  6. | VTdate
  7. | VTduration
  8. | VTstring
  9. | VTaddress
  10. | VTcurrency
  11. | VTkey
  12. | VTkeyhash
  13. | VTsignature
  14. | VTbytes
  15. | VTchainid
  16. | VTbls12_381_fr
  17. | VTbls12_381_g1
  18. | VTbls12_381_g2
  19. | VTnever
  20. | VTchest
  21. | VTchest_key
type ptyp =
  1. | Tnamed of int
  2. | Tasset of longident
  3. | Trecord of longident
  4. | Tevent of longident
  5. | Tenum of longident
  6. | Tbuiltin of vtyp
  7. | Tcontainer of type_ * container
  8. | Tset of type_
  9. | Tlist of type_
  10. | Tmap of type_ * type_
  11. | Tbig_map of type_ * type_
  12. | Titerable_big_map of type_ * type_
  13. | Tor of type_ * type_
  14. | Tlambda of type_ * type_
  15. | Ttuple of type_ list
  16. | Toption of type_
  17. | Toperation
  18. | Tcontract of type_
  19. | Tticket of type_
  20. | Tsapling_state of int
  21. | Tsapling_transaction of int
and type_ = ptyp
type logical_operator =
  1. | And
  2. | Or
  3. | Xor
val show_logical_operator : logical_operator -> Ppx_deriving_runtime.string
type comparison_operator =
  1. | Equal
  2. | Nequal
  3. | Gt
  4. | Ge
  5. | Lt
  6. | Le
val show_comparison_operator : comparison_operator -> Ppx_deriving_runtime.string
type assignment_operator =
  1. | ValueAssign
  2. | PlusAssign
  3. | MinusAssign
  4. | MultAssign
  5. | DivAssign
  6. | AndAssign
  7. | OrAssign
val show_assignment_operator : assignment_operator -> Ppx_deriving_runtime.string
type arithmetic_operator =
  1. | Plus
  2. | Minus
  3. | Mult
  4. | DivRat
  5. | DivEuc
  6. | Modulo
  7. | DivMod
  8. | ThreeWayCmp
  9. | ShiftLeft
  10. | ShiftRight
val show_arithmetic_operator : arithmetic_operator -> Ppx_deriving_runtime.string
type unary_arithmetic_operator =
  1. | Uminus
val show_unary_arithmetic_operator : unary_arithmetic_operator -> Ppx_deriving_runtime.string
type operator = [
  1. | `Logical of logical_operator
  2. | `Cmp of comparison_operator
  3. | `Arith of arithmetic_operator
  4. | `Unary of unary_arithmetic_operator
  5. | `Assign of assignment_operator
]
val show_operator : operator -> Ppx_deriving_runtime.string
type const =
  1. | Cstate
  2. | Cnow
  3. | Ctransferred
  4. | Ccaller
  5. | Cfail
  6. | Cbalance
  7. | Csource
  8. | Cselfaddress
  9. | Cselfchainid
  10. | Coperations
  11. | Cmetadata
  12. | Clevel
  13. | Cadd
  14. | Cput
  15. | Caddupdate
  16. | Cceil
  17. | Cclear
  18. | Cconcat
  19. | Ccontains
  20. | Ccount
  21. | Cfloor
  22. | Cget
  23. | Cgetopt
  24. | Cisnone
  25. | Cissome
  26. | Cinttonat
  27. | Clength
  28. | Cmax
  29. | Cmin
  30. | Cnth
  31. | Cpack
  32. | Cremove
  33. | Cremoveall
  34. | Cremoveif
  35. | Cselect
  36. | Cslice
  37. | Csort
  38. | Csum
  39. | Cunpack
  40. | Cupdate
  41. | Cupdateall
  42. | Cmakeoperation
  43. | Cmakeevent
  44. | Cmakesandboxexecoperation
  45. | Cnattostring
  46. | Cbytestonat
  47. | Cnattobytes
  48. | Cbytestoint
  49. | Cinttobytes
  50. | Cexec
  51. | Capply
  52. | Cinttodate
  53. | CmutezToNat
  54. | Csetdelegate
  55. | Ckeyhashtocontract
  56. | Csubnat
  57. | Csubmutez
  58. | Cgreedyand
  59. | Cgreedyor
  60. | CmakeAsset
  61. | CtoContainer
  62. | CputRemove
  63. | CgetEntrypoint
  64. | CrequireEntrypoint
  65. | CcallView
  66. | CimportCallView
  67. | CselfCallView
  68. | Csimplifyrational
  69. | Cgetnumerator
  70. | Cgetdenominator
  71. | Cglobalconstant
  72. | Cexphorner
  73. | Csadd
  74. | Csremove
  75. | Csupdate
  76. | Cscontains
  77. | Cslength
  78. | Chead
  79. | Ctail
  80. | Cabs
  81. | Cprepend
  82. | Creverse
  83. | Cmput
  84. | Cmremove
  85. | Cmupdate
  86. | Cmget
  87. | Cmgetopt
  88. | Cmcontains
  89. | Cmlength
  90. | Cblake2b
  91. | Csha256
  92. | Csha512
  93. | Csha3
  94. | Ckeccak
  95. | Cchecksignature
  96. | Ckeytokeyhash
  97. | Ccontracttoaddress
  98. | Caddresstocontract
  99. | Ckeytoaddress
  100. | Cisimplicitaddress
  101. | Ctotalvotingpower
  102. | Cvotingpower
  103. | Cminblocktime
  104. | Ccreateticket
  105. | Creadticket
  106. | Csplitticket
  107. | Cjointickets
  108. | Csapling_empty_state
  109. | Csapling_verify_update
  110. | Cpairing_check
  111. | Copen_chest
  112. | Cemit
  113. | Csandbox_exec
type 'node struct_poly = {
  1. node : 'node;
  2. type_ : type_ option;
  3. label : Ident.ident option;
  4. loc : Location.t;
}
type qualid = qualid_node struct_poly
and qualid_node =
  1. | Qident of lident
  2. | Qdot of qualid * lident
val show_qualid : qualid -> Ppx_deriving_runtime.string
val show_qualid_node : qualid_node -> Ppx_deriving_runtime.string
type sexpr = sexpr_node struct_poly
and sexpr_node =
  1. | Sref of lident
  2. | Sor of sexpr * sexpr
  3. | Sany
val show_sexpr_node : sexpr_node -> Ppx_deriving_runtime.string
and bval_node =
  1. | BVint of Core.big_int
  2. | BVnat of Core.big_int
  3. | BVbool of bool
  4. | BVrational of Core.big_int * Core.big_int
  5. | BVdate of Core.date
  6. | BVstring of string
  7. | BVcurrency of currency * Core.big_int
  8. | BVaddress of string
  9. | BVduration of Core.duration
  10. | BVbytes of string
  11. | BVunit
  12. | BVbls12_381_num_fr of Core.big_int
  13. | BVbls12_381_byt_fr of string
  14. | BVbls12_381_g1 of string
  15. | BVbls12_381_g2 of string
val show_bval_node : bval_node -> Ppx_deriving_runtime.string
type pattern = pattern_node struct_poly
and pattern_node =
  1. | Mwild
  2. | Mconst of lident * lident list
val show_pattern : pattern -> Ppx_deriving_runtime.string
val show_pattern_node : pattern_node -> Ppx_deriving_runtime.string
type call_kind =
  1. | Cid of longident
  2. | Cconst of const
val show_call_kind : call_kind -> Ppx_deriving_runtime.string
type michelson_struct = {
  1. ms_content : Michelson.obj_micheline;
}
val show_michelson_struct : michelson_struct -> Ppx_deriving_runtime.string
type pterm = pterm_node struct_poly
and pterm_node =
  1. | Pif of pterm * pterm * pterm
  2. | Pmatchwith of pterm * (pattern * pterm) list
  3. | Pmatchoption of pterm * lident list * pterm * pterm
  4. | Pmatchor of pterm * lident list * pterm * lident list * pterm
  5. | Pmatchlist of pterm * lident * lident * pterm * pterm
  6. | Pfold of pterm * lident * pterm
  7. | Pmap of pterm * lident * pterm
  8. | Pcall of pterm option * call_kind * type_ list * pterm_arg list
  9. | Plogical of logical_operator * pterm * pterm
  10. | Pnot of pterm
  11. | Pmulticomp of pterm * (comparison_operator * pterm) list
  12. | Pcomp of comparison_operator * pterm * pterm
  13. | Parith of arithmetic_operator * pterm * pterm
  14. | Puarith of unary_arithmetic_operator * pterm
  15. | Precord of pterm list
  16. | Precupdate of pterm * (lident * pterm) list
  17. | Pletin of lident * pterm * type_ option * pterm * pterm option
  18. | Pdeclvar of lident * type_ option * pterm * bool
  19. | Pvar of longident
  20. | Parray of pterm list
  21. | Plit of bval
  22. | Pdot of pterm * lident
  23. | Pquestiondot of pterm * lident
  24. | Pconst of const
  25. | Ptuple of pterm list
  26. | Ptupleaccess of pterm * Core.big_int
  27. | Pnone
  28. | Psome of pterm
  29. | Pleft of type_ * pterm
  30. | Pright of type_ * pterm
  31. | Plambda of type_ * lident * type_ * pterm
  32. | Plambda_michelson of type_ * type_ * Michelson.obj_micheline
  33. | Pcast of type_ * type_ * pterm
  34. | Pself of lident
  35. | Pself_contract of type_ * lident option
  36. | Pternary of pterm * pterm * pterm
  37. | Pcreatecontract of pterm * pterm * create_contract_type
  38. | Ptz_expr of string
  39. | Pmicheline_expr of type_ * Michelson.obj_micheline * pterm list
  40. | Pfailexpr of pterm
and pterm_arg =
  1. | AExpr of pterm
  2. | AFun of lident * type_ * (lident * type_ * pterm) list * pterm
  3. | AEffect of (lident * operator * pterm) list
  4. | ASorting of bool * lident
  5. | AIdent of lident
and create_contract_type =
  1. | CCTz of michelson_struct * pterm
  2. | CCArl of Ident.ident * (Ident.ident * pterm) list
val show_pterm_node : pterm_node -> Ppx_deriving_runtime.string
val show_pterm_arg : pterm_arg -> Ppx_deriving_runtime.string
val show_create_contract_type : create_contract_type -> Ppx_deriving_runtime.string
type instruction = {
  1. node : instruction_node;
  2. label : string option;
  3. loc : Location.t;
}
and transfer_t =
  1. | TTsimple of pterm * pterm
  2. | TTcontract of pterm * pterm * lident * type_ * pterm
  3. | TTentry of pterm * pterm * pterm
  4. | TTgen of pterm * Ident.ident * Ident.ident * type_ * pterm * pterm
  5. | TTself of pterm * lident * (lident * pterm) list
  6. | TToperation of pterm
and detach_kind =
  1. | DK_option of type_ * Ident.ident
  2. | DK_map of type_ * Ident.ident * pterm
and var_decl_kind =
  1. | VDKbasic
  2. | VDKoption of pterm option
and instruction_node =
  1. | Iif of pterm * instruction * instruction
  2. | Ifor of for_ident * pterm * instruction
  3. | Iiter of lident * pterm * pterm * instruction
  4. | Iwhile of pterm * instruction
  5. | Iletin of lident * pterm * instruction
  6. | Ideclvar of (lident * type_) list * pterm * var_decl_kind * bool
  7. | Iseq of instruction list
  8. | Imatchwith of pterm * (pattern * instruction) list
  9. | Imatchoption of pterm * lident list * instruction * instruction
  10. | Imatchor of pterm * lident list * instruction * lident list * instruction
  11. | Imatchlist of pterm * lident * lident * instruction * instruction
  12. | Imatchdetach of detach_kind * lident * instruction * instruction
  13. | Iassign of assignment_operator * type_ * lvalue * pterm * pterm option
  14. | Irequire of bool * pterm * pterm
  15. | Itransfer of transfer_t
  16. | Iemit of longident * pterm
  17. | Icall of pterm option * call_kind * pterm_arg list
  18. | Ireturn of pterm
  19. | Ifail of pterm
  20. | Ifailsome of pterm
  21. | Idetach of lident * detach_kind * type_ * pterm
  22. | Imicheline of Michelson.obj_micheline
and for_ident =
  1. | FIsimple of lident
  2. | FIdouble of lident * lident
and lvalue = [
  1. | `Var of lident
  2. | `Field of longident * pterm * lident
  3. | `Asset of longident * pterm * lident
  4. | `Tuple of pterm * int * int
]
val show_instruction : instruction -> Ppx_deriving_runtime.string
val show_transfer_t : transfer_t -> Ppx_deriving_runtime.string
val show_detach_kind : detach_kind -> Ppx_deriving_runtime.string
val show_var_decl_kind : var_decl_kind -> Ppx_deriving_runtime.string
val show_instruction_node : instruction_node -> Ppx_deriving_runtime.string
val show_for_ident : for_ident -> Ppx_deriving_runtime.string
val show_lvalue : lvalue -> Ppx_deriving_runtime.string
type 'a decl_gen = {
  1. name : 'a;
  2. typ : type_ option;
  3. default : pterm option;
  4. shadow : bool;
  5. loc : Location.t;
}
type label_term = {
  1. label : lident option;
  2. term : pterm;
  3. error : pterm option;
  4. loc : Location.t;
}
val show_label_term : label_term -> Ppx_deriving_runtime.string
type variable_kind =
  1. | VKconstant
  2. | VKvariable
val show_variable_kind : variable_kind -> Ppx_deriving_runtime.string
type variable = {
  1. decl : longident decl_gen;
  2. kind : variable_kind;
  3. loc : Location.t;
}
val show_variable : variable -> Ppx_deriving_runtime.string
type parameter = {
  1. name : lident;
  2. typ : type_;
  3. default : pterm option;
  4. value : pterm option;
  5. const : bool;
  6. loc : Location.t;
}
val show_parameter : parameter -> Ppx_deriving_runtime.string
type entry_description =
  1. | ADAny
  2. | ADOp of string * lident
val show_entry_description : entry_description -> Ppx_deriving_runtime.string
type security_role = lident
val show_security_role : security_role -> Ppx_deriving_runtime.string
type security_entry =
  1. | Sany
  2. | Sentry of lident list
val show_security_entry : security_entry -> Ppx_deriving_runtime.string
type view_visibility =
  1. | VVonchain
  2. | VVonoffchain
  3. | VVoffchain
val show_view_visibility : view_visibility -> Ppx_deriving_runtime.string
type fun_kind =
  1. | FKfunction
  2. | FKview of view_visibility
val show_fun_kind : fun_kind -> Ppx_deriving_runtime.string
type returned_fun_type =
  1. | Typed of ptyp
  2. | Void
val show_returned_fun_type : returned_fun_type -> Ppx_deriving_runtime.string
type function_ = {
  1. name : longident;
  2. kind : fun_kind;
  3. args : lident decl_gen list;
  4. body : instruction;
  5. return : returned_fun_type;
  6. side_effect : bool;
  7. storage_usage : bool;
  8. loc : Location.t;
}
val show_function_ : function_ -> Ppx_deriving_runtime.string
type rexpr = rexpr_node struct_poly
and rexpr_node =
  1. | Rany
  2. | Rasset of longident
  3. | Rexpr of pterm
  4. | Ror of rexpr * rexpr
val show_rexpr_node : rexpr_node -> Ppx_deriving_runtime.string
type transition = {
  1. from : sexpr;
  2. trs : (lident * pterm option * instruction option) list;
}
val show_transition : transition -> Ppx_deriving_runtime.string
type tr_kind =
  1. | Entry
  2. | Getter of ptyp
val show_tr_kind : tr_kind -> Ppx_deriving_runtime.string
type transaction = {
  1. kind : tr_kind;
  2. name : lident;
  3. args : lident decl_gen list;
  4. sourcedby : (rexpr * pterm option) Location.loced option;
  5. calledby : (rexpr * pterm option) Location.loced option;
  6. state_is : (lident * pterm option) Location.loced option;
  7. accept_transfer : bool * pterm option;
  8. constants : label_term list option;
  9. require : label_term list option;
  10. failif : label_term list option;
  11. transition : transition option;
  12. functions : function_ list;
  13. effect : instruction option;
  14. loc : Location.t;
}
val show_transaction : transaction -> Ppx_deriving_runtime.string
type enum_item_struct = {
  1. name : lident;
  2. initial : bool;
  3. invariants : label_term list;
  4. args : ptyp list;
  5. loc : Location.t;
}
val show_enum_item_struct : enum_item_struct -> Ppx_deriving_runtime.string
type enum_kind =
  1. | EKenum of longident
  2. | EKstate of namespace
val show_enum_kind : enum_kind -> Ppx_deriving_runtime.string
type enum = {
  1. kind : enum_kind;
  2. items : enum_item_struct list;
  3. loc : Location.t;
}
type map_kind =
  1. | MKMap
  2. | MKBigMap
  3. | MKIterableBigMap
val show_map_kind : map_kind -> Ppx_deriving_runtime.string
type init_asset =
  1. | IAliteral of pterm list list
  2. | IAident of lident
val show_init_asset : init_asset -> Ppx_deriving_runtime.string
type asset = {
  1. name : longident;
  2. fields : lident decl_gen list;
  3. keys : lident list;
  4. sort : lident list;
  5. map_kind : map_kind;
  6. init : init_asset;
  7. specs : label_term list;
  8. loc : Location.t;
}
type position =
  1. | Pleaf of lident
  2. | Pnode of position list
val show_position : position -> Ppx_deriving_runtime.string
type record = {
  1. name : longident;
  2. fields : lident decl_gen list;
  3. pos : position;
  4. loc : Location.t;
}
val show_record : record -> Ppx_deriving_runtime.string
type decl_ =
  1. | Dvariable of variable
  2. | Dasset of asset
  3. | Drecord of record
  4. | Denum of enum
  5. | Devent of record
type fun_ =
  1. | Ffunction of function_
  2. | Ftransaction of transaction
type metadata_kind =
  1. | MKuri of string Location.loced
  2. | MKjson of string Location.loced
val show_metadata_kind : metadata_kind -> Ppx_deriving_runtime.string
type import_kind_node =
  1. | INMichelson of michelson_struct
  2. | INArchetype
val show_import_kind_node : import_kind_node -> Ppx_deriving_runtime.string
type ast = {
  1. name : lident;
  2. parameters : parameter list;
  3. metadata : metadata_kind option;
  4. decls : decl_ list;
  5. funs : fun_ list;
  6. loc : Location.t;
}
val vtaddress : ptyp
val vtbls12_381_fr : ptyp
val vtbls12_381_g1 : ptyp
val vtbls12_381_g2 : ptyp
val vtbool : ptyp
val vtbytes : ptyp
val vtchainid : ptyp
val vtcurrency : ptyp
val vtdate : ptyp
val vtduration : ptyp
val vtint : ptyp
val vtkey : ptyp
val vtkeyhash : ptyp
val vtnat : ptyp
val vtrational : ptyp
val vtsignature : ptyp
val vtstring : ptyp
val vtunit : ptyp
val vtnever : ptyp
val vtchest : ptyp
val vtchest_key : ptyp
val vts : ptyp list
val mk_sp : ?label:Ident.ident -> ?loc:Location.t -> ?type_:type_ -> 'a -> 'b struct_poly
val mk_instr : ?label:string -> ?loc:Location.t -> instruction_node -> instruction
val mk_label_term : ?label:lident -> ?error:pterm -> ?loc:Location.t -> pterm -> label_term
val mk_variable : ?loc:Location.t -> longident decl_gen -> variable_kind -> variable
val mk_function_struct : ?args:lident decl_gen list -> ?loc:Location.t -> longident -> fun_kind -> instruction -> returned_fun_type -> bool -> bool -> function_
val mk_transition : ?trs:(lident * pterm option * instruction option) list -> sexpr -> transition
val mk_transaction_struct : ?args:lident decl_gen list -> ?sourcedby:(rexpr * pterm option) Location.loced -> ?calledby:(rexpr * pterm option) Location.loced -> ?state_is:(lident * pterm option) Location.loced -> ?accept_transfer:(bool * pterm option) -> ?constants:label_term list -> ?require:label_term list -> ?failif:label_term list -> ?transition:transition -> ?functions:function_ list -> ?effect:instruction -> ?loc:Location.t -> tr_kind -> lident -> transaction
val mk_enum_item : ?initial:bool -> ?args:ptyp list -> ?invariants:label_term list -> ?loc:Location.t -> lident -> enum_item_struct
val mk_enum : ?items:enum_item_struct list -> ?loc:Location.t -> enum_kind -> enum
val mk_decl : ?typ:type_ -> ?default:pterm -> ?shadow:bool -> ?loc:Location.t -> 'a -> 'b decl_gen
val mk_asset : ?fields:lident decl_gen list -> ?keys:lident list -> ?sort:lident list -> ?map_kind:map_kind -> ?init:init_asset -> ?specs:label_term list -> ?loc:Location.t -> longident -> asset
val mk_model : ?parameters:parameter list -> ?metadata:metadata_kind -> ?decls:decl_ list -> ?funs:fun_ list -> ?loc:Location.t -> lident -> ast
val mk_id : type_ -> lident -> qualid
val map_ptyp : (type_ -> type_) -> ptyp -> ptyp
module Utils : sig ... end