package archetype

  1. Overview
  2. Docs
module L = Location
module PT = ParseTree
module A = Ast
module T = Michelson
module Type : sig ... end
type opsig = {
  1. osl_sig : A.ptyp list;
  2. osl_ret : A.ptyp;
}
val pp_opsig : Ppx_deriving_runtime.Format.formatter -> opsig -> Ppx_deriving_runtime.unit
type namespace =
  1. | Current
  2. | Named of Ident.ident
val show_namespace : namespace -> Ppx_deriving_runtime.string
val uknm : namespace
type longident = namespace * Ident.ident
val show_longident : longident -> Ppx_deriving_runtime.string
type fullname = A.lident * A.lident
val pp_fullname : Ppx_deriving_runtime.Format.formatter -> fullname -> Ppx_deriving_runtime.unit
val show_fullname : fullname -> Ppx_deriving_runtime.string
val unloc_longident : A.longident -> Ident.ident
val loc_longident : A.longident -> Location.t
val mknm : (Ident.ident option * 'a) -> namespace * 'b
val unloc_nm : PT.id_scope -> namespace
val unloc_nmid : (PT.id_scope * 'a Location.loced) -> namespace * 'b
val loc_nmid : (PT.id_scope * 'a Location.loced) -> Location.t
val pt_to_longident : (PT.id_scope * PT.lident) -> A.longident
type error_desc =
  1. | TODO
  2. | AEntryExpected of A.ptyp
  3. | AlienPattern
  4. | AnonymousFieldInEffect
  5. | AssetExpected of A.ptyp
  6. | AssetOrRecordExpected of A.ptyp
  7. | AssetUpdateInNonFormula
  8. | AssetWithoutFields
  9. | AssetWithoutPKey
  10. | BeforeIrrelevant of [ `Local | `State ]
  11. | BeforeOrLabelInExpr
  12. | BindingInExpr
  13. | CannotAssignArgument of Ident.ident
  14. | CannotAssignConstVar of Ident.ident
  15. | CannotAssignLoopIndex of Ident.ident
  16. | CannotAssignPatternVariable of Ident.ident
  17. | CannotAssignStorageVariableInView of Ident.ident
  18. | CannotCallSideEffectFunctionInView
  19. | CannotCaptureVariables
  20. | CannotEffectConstVar
  21. | CannotImportFunctionWithSideEffect
  22. | CannotImportFunctionWithStorageUsage
  23. | CannotInfer
  24. | CannotInferAnonAssetOrRecord
  25. | CannotInferCollectionType
  26. | CannotUpdatePKey
  27. | CannotUseInstrWithSideEffectInView
  28. | CollectionExpected
  29. | ContainerOfNonAsset
  30. | ContractInvariantInLocalSpec
  31. | CreateContractStorageDuplicatedField of Ident.ident
  32. | CreateContractStorageInvalidArgType
  33. | CreateContractStorageInvalidAssignOperator
  34. | CreateContractStorageInvalidField
  35. | CreateContractStorageMissingField of Ident.ident
  36. | CreateContractStorageRequireLitValueForConst of Ident.ident
  37. | CreateContractStorageUnknownField of Ident.ident
  38. | DetachInvalidExprFrom
  39. | DetachInvalidType of Ident.ident
  40. | DetachMatchInvalidPattern
  41. | DifferentMemoSizeForSaplingVerifyUpdate of int * int
  42. | DivergentExpr
  43. | DoesNotSupportMethodCall
  44. | DuplicatedArgName of Ident.ident
  45. | DuplicatedCtorName of Ident.ident
  46. | DuplicatedFieldInAssetDecl of Ident.ident
  47. | DuplicatedFieldInAssetOrRecordLiteral of Ident.ident
  48. | DuplicatedFieldInRecordDecl of Ident.ident
  49. | DuplicatedInitMarkForCtor
  50. | DuplicatedPackingVar of Ident.ident
  51. | DuplicatedPkeyField of Ident.ident
  52. | DuplicatedVarDecl of Ident.ident
  53. | EffectInGlobalSpec
  54. | EmptyEnumDecl
  55. | ExpressionExpected
  56. | FileNotFound of Ident.ident
  57. | ForeignState of Ident.ident option * Ident.ident option
  58. | FormulaExpected
  59. | FunctionInvalidInstructionVoid
  60. | FunctionInvalidTypeVoid
  61. | FunctionNoReturn
  62. | FunctionNotFound of Ident.ident
  63. | FunctionUnknownFunction of Ident.ident * Ident.ident
  64. | IncompatibleSpecSig
  65. | IncompatibleTypes of A.ptyp * A.ptyp
  66. | IndexOutOfBoundForTuple
  67. | InvalidApplicationKind of Ident.ident * Ident.ident
  68. | InvalidArcheTypeDecl
  69. | InvalidArgForGlobalConstant
  70. | InvalidArgumentType of A.ptyp * A.ptyp
  71. | InvalidArlFile
  72. | InvalidAssetCollectionExpr of A.ptyp
  73. | InvalidAssetExpression
  74. | InvalidAssetFieldTypeValueBigMap
  75. | InvalidAssetGetContainer of A.container
  76. | InvalidAssetInitIdBadType of string * A.ptyp * A.ptyp
  77. | InvalidAssetInitIdParamConst of string
  78. | InvalidAssetInitIdNotFound of string
  79. | InvalidCallByAsset
  80. | InvalidCallByExpression
  81. | InvalidContractValueForCreateContract
  82. | InvalidEffectForCtn of A.container * A.container list
  83. | InvalidEntryDescription
  84. | InvalidEntryExpression
  85. | InvalidEventType
  86. | InvalidExpression
  87. | InvalidExpressionForEffect
  88. | InvalidExprressionForTupleAccess
  89. | InvalidFailIdType of Ident.ident * A.ptyp * A.ptyp
  90. | InvalidFieldsCountInAssetOrRecordLiteral
  91. | InvalidFoldInit of A.ptyp
  92. | InvalidForIdentMap
  93. | InvalidForIdentSimple
  94. | InvalidFormula
  95. | InvalidInstruction
  96. | InvalidKeyFieldInAssetValueType
  97. | InvalidLiteralBytes
  98. | InvalidLValue
  99. | InvalidMapType
  100. | InvalidMethodInExec
  101. | InvalidMethodInFormula
  102. | InvalidMethodWithBigMap of Ident.ident
  103. | InvalidMethodWithIterableBigMap of Ident.ident
  104. | InvalidNumberOfArguments of int * int
  105. | InvalidNumberOfParameters of int * int
  106. | InvalidPackingExpr
  107. | InvalidPackingFormat
  108. | InvalidRecordFieldType
  109. | InvalidRoleExpression
  110. | InvalidSaplingEmptyStateArg
  111. | InvalidSecurityEntry
  112. | InvalidSecurityRole
  113. | InvalidSortingExpression
  114. | InvalidSourcedByAsset
  115. | InvalidSourcedByExpression
  116. | InvalidStateExpression
  117. | InvalidStorageType of A.ptyp * A.ptyp
  118. | InvalidStringValue
  119. | InvalidTezValueNeg
  120. | InvalidTezValueOverflow
  121. | InvalidTypeDeclOpt
  122. | InvalidTypeForAddressToContract
  123. | InvalidTypeForBigMapKey
  124. | InvalidTypeForBigMapValue
  125. | InvalidTypeForCallview
  126. | InvalidTypeForContract
  127. | InvalidTypeForDoFailIf
  128. | InvalidTypeForDoRequire
  129. | InvalidTypeForEntrypoint
  130. | InvalidTypeForFail
  131. | InvalidTypeForFailSome
  132. | InvalidTypeForGlobalConstant
  133. | InvalidTypeForLambdaArgument
  134. | InvalidTypeForLambdaReturn
  135. | InvalidTypeForMake
  136. | InvalidTypeForMakeEvent
  137. | InvalidTypeForMapKey
  138. | InvalidTypeForMapOperator of A.ptyp
  139. | InvalidTypeForMapValue
  140. | InvalidTypeForOptionalAssign
  141. | InvalidTypeForOrLeft
  142. | InvalidTypeForOrRight
  143. | InvalidTypeForParameter
  144. | InvalidTypeForPk
  145. | InvalidTypeForSet
  146. | InvalidTypeForTuple
  147. | InvalidTypePassable of A.ptyp
  148. | InvalidTypeStorable of A.ptyp
  149. | InvalidTzFile
  150. | InvalidValueForCurrency
  151. | InvalidValueForMemoSize
  152. | InvalidVariableForMethod
  153. | InvalidVarOrArgType
  154. | InvalidZeroValue
  155. | LabelInNonInvariant
  156. | LetInElseInInstruction
  157. | LetInElseOnNonOption
  158. | MethodCallInPredicate
  159. | MisorderedPkeyFields
  160. | MissingFieldInAssetOrRecordLiteral of Ident.ident
  161. | MixedAnonInAssetOrRecordLiteral
  162. | MixedFieldNamesInAssetOrRecordLiteral of longident list
  163. | MoreThanOneInitState of Ident.ident list
  164. | MultipleAssetStateDeclaration
  165. | MultipleInitialMarker
  166. | MultipleMatchingFunction of longident * A.ptyp list * (A.ptyp list * A.ptyp) list
  167. | MultipleMatchingOperator of PT.operator * A.ptyp list * opsig list
  168. | MultipleStateDeclaration
  169. | NameIsAlreadyBound of Ident.ident * Location.t option
  170. | NoLetInInstruction
  171. | NoMatchingFunction of longident * A.ptyp list
  172. | NoMatchingOperator of PT.operator * A.ptyp list
  173. | NonCodeLabel of Ident.ident
  174. | NonHomogeneousPattern of Ident.ident
  175. | NonIterable
  176. | NonIterableBigMapAsset of longident
  177. | NonLoopLabel of Ident.ident
  178. | NoSuchMethod of Ident.ident
  179. | NotAKeyOfType
  180. | NotAnAssetType
  181. | NotAnEnumType
  182. | NotAPrimitiveType
  183. | NotARole of Ident.ident
  184. | NumericExpressionExpected
  185. | NumericOrCurrencyExpressionExpected
  186. | OpInRecordLiteral
  187. | OrphanedLabel of Ident.ident
  188. | PackUnpackOnNonPrimitive
  189. | PartialMatch of Ident.ident list
  190. | PostConditionInGlobalSpec
  191. | ReadOnlyGlobal of Ident.ident
  192. | RecordExpected
  193. | RecordUpdateDuplicatedFieldName of Ident.ident
  194. | RecordUpdateOnNonRecordOrAsset
  195. | RecordUpdateOnPKey
  196. | RecordUpdateWithInvalidFieldName
  197. | ReturnInVoidContext
  198. | SecurityInExpr
  199. | SpecOperatorInExpr
  200. | StringLiteralExpected
  201. | TransferWithoutDest
  202. | UninitializedVar
  203. | UnknownAsset of Ident.ident
  204. | UnknownAssetToProperty of Ident.ident
  205. | UnknownCreateContractExtension of Ident.ident
  206. | UnknownEntry of Ident.ident
  207. | UnknownEnum of Ident.ident
  208. | UnknownFailId of Ident.ident
  209. | UnknownField of longident * Ident.ident
  210. | UnknownFieldName of Ident.ident
  211. | UnknownFunction of Ident.ident
  212. | UnknownGetter of Ident.ident
  213. | UnknownImport of Ident.ident
  214. | UnknownImportExtension of Ident.ident
  215. | UnknownLabel of Ident.ident
  216. | UnknownLocalOrVariable of longident
  217. | UnknownProcedure of Ident.ident
  218. | UnknownState of Ident.ident
  219. | UnknownTypeName of longident
  220. | UnknownVariable of Ident.ident
  221. | UnknownView of Ident.ident
  222. | UpdateEffectOnPkey
  223. | UpdateEffectWithoutDefault
  224. | UselessPattern
  225. | UsePkeyOfInsteadOfAsset
  226. | VarMultiInvalidTupleType of int
  227. | VarMultiInvalidType
  228. | ViewInvalidFsType of Ident.ident * Ident.ident
  229. | ViewInvalidReturnType
  230. | ViewInvalidVisibility
  231. | VoidMethodInExpr
  232. | VSetInExpr
  233. | VSetOnNonAsset
val show_error_desc : error_desc -> Ppx_deriving_runtime.string
type error = L.t * error_desc
val pp_operator : Core.Format.formatter -> PT.operator -> unit
val pp_namespace : Stdlib.Format.formatter -> namespace -> unit
val pp_longident : Stdlib.Format.formatter -> (namespace * Ident.ident) -> Ppx_deriving_runtime.unit
val pp_error_desc : Stdlib.Format.formatter -> error_desc -> Ppx_deriving_runtime.unit
type argtype = [
  1. | `Type of A.type_
  2. | `Effect of Ident.ident
]
val cmptypes : A.vtyp list
val grptypes : A.vtyp list
val rgtypes : A.vtyp list
val vt_comparable : A.ptyp list
val cmpsigs : (PT.operator * (A.vtyp list * A.vtyp)) list
val tsigs : (PT.operator * (A.vtyp list * A.vtyp)) list
val opsigs2 : (PT.operator * (A.vtyp list * A.ptyp)) list
val opsigs : (PT.operator * opsig) list
type acttx = [
  1. | `Entry of PT.entry_decl
  2. | `Transition of PT.transition_decl
  3. | `Getter of PT.getter_decl
]
type groups = {
  1. gr_archetypes : PT.lident Location.loced list;
  2. gr_imports : (PT.lident option * PT.lident) Location.loced list;
  3. gr_states : PT.enum_decl Location.loced list;
  4. gr_enums : (PT.lident * PT.enum_decl) Location.loced list;
  5. gr_assets : PT.asset_decl Location.loced list;
  6. gr_records : PT.record_decl Location.loced list;
  7. gr_events : PT.record_decl Location.loced list;
  8. gr_vars : PT.variable_decl Location.loced list;
  9. gr_funs : PT.s_function Location.loced list;
  10. gr_acttxs : acttx Location.loced list;
}
val globals : (string * A.const * A.ptyp) list
val statename : string
type ('args, 'rty) gmethod_ = {
  1. mth_name : A.const;
  2. mth_purity : [ `Pure | `Effect of A.container list ];
  3. mth_totality : [ `Total | `Partial ];
  4. mth_map_type : [ `Both | `Standard ];
  5. mth_sig : 'args * 'rty option;
}
type mthstyp = [
  1. | `T of A.ptyp
]
type mthtyp = [
  1. | mthstyp
  2. | `The
  3. | `Pk
  4. | `OPk
  5. | `ThePkForAggregate
  6. | `Asset
  7. | `Coll
  8. | `SubColl
  9. | `Container
  10. | `PkOrAsset
  11. | `OptVal
  12. | `Cmp
  13. | `Pred of bool
  14. | `RExpr of bool
  15. | `Ef of bool
  16. | `Ref of int
]
and mthatyp = [
  1. | `Fixed of mthtyp list
  2. | `Multi of mthtyp
]
type smethod_ = (mthstyp list, mthstyp) gmethod_
type method_ = (mthatyp, mthtyp) gmethod_
val methods : method_ Ident.Mid.t
type opinfo = {
  1. op_name : string;
  2. op_const : A.const;
  3. op_partial : [ `Partial | `Total ];
  4. op_thety : A.type_ option;
  5. op_sig : A.type_ list;
  6. op_resty : [ `Self | `Ty of A.type_ ];
  7. op_restr : Type.trestr Tools.Mint.t;
  8. op_filter : (A.type_ list -> A.pterm list -> bool) option;
}
val op : ?op_filter:(A.type_ list -> A.pterm list -> bool) -> string -> A.const -> [ `Partial | `Total ] -> A.type_ option -> A.type_ list -> [ `Self | `Ty of A.type_ ] -> Type.trestr Tools.Mint.t -> opinfo
val coreops : opinfo list
val optionops : opinfo list
val setops : opinfo list
val listops : opinfo list
val mapops : opinfo list
val bigmapops : opinfo list
val iterablebigmapops : opinfo list
val cryptoops : opinfo list
val mathops : opinfo list
val packops : opinfo list
val opsops : opinfo list
val lambdaops : opinfo list
val ticket_ops : opinfo list
val bls_ops : opinfo list
val timelock_ops : opinfo list
val allops : opinfo list
type instr_info = {
  1. instr_name : string;
  2. instr_const : A.const;
  3. instr_sig : A.type_ list;
  4. instr_side_effect : bool;
}
val instr : string -> A.const -> A.type_ list -> bool -> instr_info
val instrs : instr_info list
val get_opt_instr : Tools.String.t -> instr_info list -> instr_info option
type 'env importdecl = {
  1. id_name : A.lident;
  2. id_path : A.lident;
  3. id_content : Michelson.obj_micheline option;
  4. id_ast : A.ast option;
  5. id_entrypoints : (Ident.ident * A.type_) list;
  6. id_views : (Ident.ident * (A.type_ * A.type_)) list;
  7. id_funs : A.function_ list;
  8. id_env : 'env option;
}
val pp_importdecl : 'env. (Ppx_deriving_runtime.Format.formatter -> 'env -> Ppx_deriving_runtime.unit) -> Ppx_deriving_runtime.Format.formatter -> 'env importdecl -> Ppx_deriving_runtime.unit
val show_importdecl : 'env. (Ppx_deriving_runtime.Format.formatter -> 'env -> Ppx_deriving_runtime.unit) -> 'env importdecl -> Ppx_deriving_runtime.string
type assetdecl = {
  1. as_name : fullname;
  2. as_fields : fielddecl list;
  3. as_pkty : A.ptyp;
  4. as_pk : A.lident list;
  5. as_sortk : A.lident list;
  6. as_bm : A.map_kind;
  7. as_invs : (A.lident option * A.pterm) list;
  8. as_init : A.init_asset;
}
and fielddecl = {
  1. fd_name : A.lident;
  2. fd_type : A.ptyp;
  3. fd_dfl : A.pterm option;
}
val pp_assetdecl : Ppx_deriving_runtime.Format.formatter -> assetdecl -> Ppx_deriving_runtime.unit
val show_assetdecl : assetdecl -> Ppx_deriving_runtime.string
val pp_fielddecl : Ppx_deriving_runtime.Format.formatter -> fielddecl -> Ppx_deriving_runtime.unit
val show_fielddecl : fielddecl -> Ppx_deriving_runtime.string
val get_field : Ident.ident -> assetdecl -> fielddecl option
type recorddecl = {
  1. rd_name : fullname;
  2. rd_fields : rfielddecl list;
  3. rd_packing : rpacking option;
}
and rfielddecl = {
  1. rfd_name : A.lident;
  2. rfd_type : A.ptyp;
  3. rfd_dfl : A.pterm option;
}
and rpacking =
  1. | RLeaf of A.lident
  2. | RNode of rpacking list
val pp_recorddecl : Ppx_deriving_runtime.Format.formatter -> recorddecl -> Ppx_deriving_runtime.unit
val show_recorddecl : recorddecl -> Ppx_deriving_runtime.string
val pp_rfielddecl : Ppx_deriving_runtime.Format.formatter -> rfielddecl -> Ppx_deriving_runtime.unit
val show_rfielddecl : rfielddecl -> Ppx_deriving_runtime.string
val pp_rpacking : Ppx_deriving_runtime.Format.formatter -> rpacking -> Ppx_deriving_runtime.unit
val show_rpacking : rpacking -> Ppx_deriving_runtime.string
val get_rfield : Ident.ident -> recorddecl -> rfielddecl option
type vardecl = {
  1. vr_name : A.longident;
  2. vr_type : A.ptyp;
  3. vr_kind : [ `Constant | `Variable | `Enum ];
  4. vr_def : (A.pterm * [ `Inline | `Std ]) option;
  5. vr_core : A.const option;
}
type fundecl = {
  1. fs_name : A.longident;
  2. fs_kind : A.fun_kind;
  3. fs_args : (A.lident * A.ptyp) list;
  4. fs_retty : A.returned_fun_type;
  5. fs_body : A.instruction;
  6. fs_side_effect : bool;
  7. fs_storage_usage : bool;
}
type preddecl = {
  1. pr_name : A.lident;
  2. pr_args : (A.lident * A.ptyp) list;
  3. pr_body : A.pterm;
}
type txeffect = {
  1. tx_state : A.lident;
  2. tx_when : A.pterm option;
  3. tx_effect : A.instruction option;
}
type tentrydecl = {
  1. ad_name : A.lident;
  2. ad_args : (A.lident * A.ptyp) list;
  3. ad_getter : bool;
  4. ad_ret_t : A.ptyp option;
  5. ad_srcby : (A.pterm option Location.loced list * A.pterm option) Location.loced;
  6. ad_callby : (A.pterm option Location.loced list * A.pterm option) Location.loced;
  7. ad_stateis : (A.lident * A.pterm option) Location.loced option;
  8. ad_effect : [ `Raw of A.instruction | `Tx of transition ] option;
  9. ad_funs : fundecl option list;
  10. ad_csts : (A.lident option * A.pterm * A.pterm option) Location.loced list;
  11. ad_reqs : (A.lident option * A.pterm * A.pterm option) Location.loced list;
  12. ad_fais : (A.lident option * A.pterm * A.pterm option) Location.loced list;
  13. ad_actfs : bool * A.pterm option;
  14. ad_loc : Location.t;
}
and transition = A.sexpr * txeffect list
type statedecl = {
  1. sd_name : A.longident;
  2. sd_state : bool;
  3. sd_ctors : ctordecl list;
  4. sd_init : Ident.ident;
}
and ctordecl = A.lident * A.ptyp list
val get_ctor : Ident.ident -> ctordecl list -> ctordecl option
type definitiondecl = {
  1. df_name : A.longident;
  2. df_arg : A.lident * A.ptyp;
  3. df_asset : A.lident;
  4. df_body : A.pterm;
}
val pterm_arg_as_pterm : A.pterm_arg -> A.pterm option
val core_types : (string * A.ptyp) list
val ident_of_pname : ParseTree.pname -> Ident.ident
val as_pre : [> `Pre of 'a ] -> 'b
val as_full : [> `Full of 'a ] -> 'b
module Env : sig ... end
type env = Env.t
module Micheline : sig ... end
val coreloc : Location.t
val empty : ?cache:Env.cache -> ?path:string -> A.lident -> env
val normalize_type : env -> A.type_ -> A.type_
val ty_of_init_ty : env -> A.ptyp -> A.ptyp
type prekind = [
  1. | `Record
  2. | `Event
  3. | `Asset
  4. | `Enum
]
val check_and_emit_name_free : env -> ?pre:prekind -> A.lident -> bool
val select_operator : Env.t -> ?asset:bool -> L.t -> (PT.operator * A.ptyp list) -> opsig option
val valid_var_or_arg_type : A.ptyp -> bool
val for_container : env -> PT.container -> A.container
val for_assignment_operator : PT.assignment_operator -> A.assignment_operator
val tt_logical_operator : PT.logical_operator -> A.logical_operator
exception InvalidType
val for_type_exn : ?pkey:Ident.ident list -> env -> PT.type_t -> A.ptyp
val for_type : ?pkey:Ident.ident list -> env -> PT.type_t -> A.ptyp option
val for_asset_type : env -> PT.type_t -> A.longident option
val for_asset_keyof_type : env -> PT.type_t -> A.longident option
val for_literal : env -> A.type_ option -> PT.literal Location.loced -> A.bval
type ekind = [
  1. | `Init
  2. | `Entry
  3. | `Getter
  4. | `Function
  5. | `View
]
type emode_t = {
  1. em_kind : ekind;
  2. em_pred : bool;
}
val decompile_match_with : [< `Enum | `List of 'b | `Option of 'c | `Or of 'd ] -> (A.pattern * 'a) list -> [> `List of (A.lident * A.lident * 'a0) * 'a1 | `Option of (A.lident * 'a2) * 'a3 | `Or of (A.lident * 'a4) * (A.lident * 'a5) ] option
type capture = {
  1. cp_global : bool;
  2. cp_local : [ `Only of Ident.Sid.t | `Yes of (L.t * A.ptyp) Ident.Mid.t Stdlib.ref option ];
}
val capture0 : capture
val extend_capture : capture -> Ident.ident list -> capture
type pattern = [
  1. | `Enum
  2. | `List of A.ptyp
  3. | `Option of A.ptyp
  4. | `Or of A.ptyp * A.ptyp
]
val parse_archetype : string -> ParseTree.archetype option
val for_xexpr : emode_t -> ?autoview:bool -> ?capture:capture -> env -> ?ety:A.ptyp -> PT.expr -> A.pterm_node A.struct_poly
val cast_expr : ?autoview:bool -> env -> A.ptyp option -> A.pterm_node A.struct_poly -> A.pterm
val join_expr : ?autoview:bool -> env -> A.ptyp option -> A.pterm_node A.struct_poly list -> A.type_ option * A.pterm list
val for_gen_matchwith : emode_t -> capture -> env -> Location.t -> PT.expr -> PT.branch list -> (pattern * ctordecl list * A.pterm * (int option * int option Tools.Mstr.t * (A.lident * A.ptyp) list list) * PT.expr list) option
val for_asset_expr : emode_t -> env -> PT.expr -> A.pterm_node A.struct_poly * Env.asset option
val for_asset_collection_expr : emode_t -> env -> [ `Parsed of PT.expr | `Typed of A.pterm_node A.struct_poly ] -> A.pterm * (assetdecl * A.container) option
val select_mop : Ident.ident -> A.ptyp list -> A.pterm_node A.struct_poly list -> opinfo -> (int * (A.const * bool * (A.ptyp list * A.ptyp))) option
val for_api_call : mode:emode_t -> ?autoview:bool -> ?capture:capture -> env -> ([< `Parsed of PT.expr | `Typed of A.pterm_node A.struct_poly Typed ] * PT.lident * PT.expr list) -> (A.pterm * (A.const * bool * (A.ptyp list * A.ptyp)) * A.pterm list) option
val for_gen_method_call : emode_t -> env -> Location.t -> ([ `Parsed of PT.expr | `Typed of A.pterm_node A.struct_poly ] * PT.lident * PT.expr list) -> (A.pterm * (assetdecl * A.container) * method_ * A.pterm_arg list * A.type_ Tools.Mint.t) option
val for_arg_effect : emode_t -> env -> update:bool -> assetdecl -> PT.expr -> (A.lident * A.operator * A.pterm) list option
val for_assign_expr : ?autoview:bool -> ?asset:bool -> ?t:A.ptyp -> emode_t -> env -> Location.t -> (A.assignment_operator * A.ptyp * A.ptyp) -> PT.expr -> A.pterm
val for_role : env -> PT.lident -> PT.lident option
val for_expr : ekind -> ?autoview:bool -> env -> ?ety:A.type_ -> PT.expr -> A.pterm
val for_rf : ekind -> ?ety:A.ptyp -> env -> (PT.lident * PT.expr * PT.expr option) Location.loced list -> env * (A.lident option * A.pterm * A.pterm option) Location.loced list
val for_rfs : ekind -> env -> (PT.lident * PT.expr * PT.expr option) Location.loced list -> env * (A.lident option * A.pterm * A.pterm option) Location.loced list
val for_cf : ekind -> ?ety:A.ptyp -> env -> (PT.lident * PT.expr * PT.expr option) Location.loced list -> env * (A.lident option * A.pterm * A.pterm option) Location.loced list
val for_cfs : ekind -> ?ety:A.ptyp -> env -> (PT.lident * PT.expr * PT.expr option) Location.loced list -> env * (A.lident option * A.pterm * A.pterm option) Location.loced list
val for_arg_decl : ?can_asset:bool -> env -> PT.lident_typ -> env * (PT.lident * A.ptyp) option
val for_args_decl : ?can_asset:bool -> env -> PT.args -> env * (PT.lident * A.ptyp) option list
val for_lvalue : ekind -> env -> PT.expr -> env * (A.lvalue * A.ptyp) option
val for_instruction_r : ret:A.type_ option -> ekind -> env -> PT.expr -> env * A.instruction
val for_instruction : ret:A.type_ option -> ekind -> env -> PT.expr -> env * A.instruction
val for_effect : ret:A.type_ option -> ekind -> env -> PT.expr -> Env.t * (env * A.instruction)
val for_named_state : Location.t -> ?enum:Ident.ident -> env -> PT.lident -> Ident.ident Location.loced
val for_state_formula : Location.t -> ?enum:Ident.ident -> env -> PT.expr -> A.sexpr
val named_sig_compatible : ('a Location.loced * A.ptyp) option list -> ('b Location.loced * A.ptyp) option list -> bool
val for_function : env -> PT.s_function Location.loced -> Env.t * fundecl option
val for_callby : Location.t -> env -> [< `Called | `Sourced ] -> PT.expr -> A.pterm_node A.struct_poly option Location.loced list
val for_entry : env -> PT.entry_properties -> PT.expr option -> PT.type_t option -> env * (A.ptyp option * (A.pterm_node A.struct_poly option Location.loced list option * A.pterm option * Location.t option) * (A.pterm_node A.struct_poly option Location.loced list option * A.pterm option * Location.t option) * (Ident.ident Location.loced * A.pterm option) Location.loced option * (bool * A.pterm option) * (A.lident option * A.pterm * A.pterm option) Location.loced list option * (A.lident option * A.pterm * A.pterm option) Location.loced list option * (A.lident option * A.pterm * A.pterm option) Location.loced list option * fundecl option list * A.instruction option)
val for_transition : ?enum:Ident.ident -> env -> (PT.lident * PT.expr option * PT.expr option) -> env * txeffect
type enum_core = (PT.lident * PT.type_t list * PT.enum_option list) list
val for_core_enum_decl : env -> enum_core Location.loced -> env * (Ident.ident * (PT.lident * A.ptyp list) list) option
val for_enum_decl : env -> (PT.lident * PT.enum_decl) Location.loced -> env * statedecl option
val for_enums_decl : env -> (PT.lident * PT.enum_decl) Location.loced list -> env * statedecl option list
val for_var_decl : env -> PT.variable_decl Location.loced -> env * vardecl option
val for_vardecl_init : env -> PT.variable_decl Location.loced -> env * vardecl option
val for_vardecls_init : env -> PT.variable_decl Location.loced list -> env * vardecl option list
val for_vars_decl : env -> PT.variable_decl Location.loced list -> env * vardecl option list
val for_fun_decl : env -> PT.s_function Location.loced -> Env.t * fundecl option
val for_funs_decl : env -> PT.s_function Location.loced list -> env * fundecl option list
type pre_assetdecl = {
  1. pas_name : A.lident;
  2. pas_fields : (string * A.ptyp * PT.expr option) Location.loced list;
  3. pas_pkty : A.ptyp;
  4. pas_pk : A.lident list;
  5. pas_sortk : A.lident list;
  6. pas_bm : A.map_kind;
  7. pas_init : PT.expr list;
  8. pas_init_id : A.lident option;
}
val for_asset_decl : Ident.ident list -> env -> (assetdecl * PT.asset_decl Location.loced) -> Env.t * pre_assetdecl option
val for_assets_decl : env -> PT.asset_decl Location.loced list -> env * assetdecl option list
val for_record_decl : [< `Event | `Record ] -> env -> PT.record_decl Location.loced -> env * recorddecl option
val for_records_decl : env -> PT.record_decl Location.loced list -> env * recorddecl option list
val for_events_decl : env -> PT.record_decl Location.loced list -> env * recorddecl option list
val for_csby : (A.pterm option Location.loced list option * A.pterm option * Location.t option) -> (A.pterm option Location.loced list * A.pterm option) Location.loced
val for_acttx_decl : env -> acttx Location.loced -> Env.t * tentrydecl option
val for_acttxs_decl : env -> acttx Location.loced list -> env * tentrydecl option list
val group_declarations : PT.declaration list -> groups
type decls = {
  1. state : statedecl option;
  2. variables : vardecl option list;
  3. enums : statedecl option list;
  4. records : recorddecl option list;
  5. events : recorddecl option list;
  6. assets : assetdecl option list;
  7. functions : fundecl option list;
  8. acttxs : tentrydecl option list;
}
val enums_of_statedecl : statedecl list -> A.enum list
val assets_of_adecls : assetdecl option list -> A.asset list
val records_of_rdecls : recorddecl list -> A.record list
val variables_of_vdecls : vardecl option list -> A.variable list
val functions_of_fdecls : fundecl option list -> A.function_ list
val transentrys_of_tdecls : tentrydecl option list -> A.transaction list
val for_parameters : ?init:PT.expr_unloc Location.loced -> env -> (A.lident * PT.type_t * PT.expr option * bool) Location.loced list Location.loced option -> env * A.parameter list
val sort_decl : Tools.String.t list -> A.decl_ list -> A.decl_ list
val for_import_decl : env -> (PT.lident option * PT.lident) Location.loced list -> env
val for_grouped_declarations : env -> (L.t * groups) -> env * decls
val get_arl_header : PT.archetype_unloc Location.loced -> ((PT.lident * PT.parameters * PT.metadata option) * PT.declaration list) option
val pretype : env -> PT.archetype_unloc -> env