package archetype
Module Archetype.TypingSource
Source
val pp_fullname :
Ppx_deriving_runtime.Format.formatter ->
fullname ->
Ppx_deriving_runtime.unitSource
type error_desc = | TODO| AEntryExpected of A.ptyp| AlienPattern| AnonymousFieldInEffect| AssetExpected of A.ptyp| AssetOrRecordExpected of A.ptyp| AssetUpdateInNonFormula| AssetWithoutFields| AssetWithoutPKey| BeforeIrrelevant of [ `Local | `State ]| BeforeOrLabelInExpr| BindingInExpr| CannotAssignArgument of Ident.ident| CannotAssignConstVar of Ident.ident| CannotAssignLoopIndex of Ident.ident| CannotAssignPatternVariable of Ident.ident| CannotAssignStorageVariableInView of Ident.ident| CannotCallSideEffectFunctionInView| CannotCaptureVariables| CannotEffectConstVar| CannotImportFunctionWithSideEffect| CannotImportFunctionWithStorageUsage| CannotInfer| CannotInferAnonAssetOrRecord| CannotInferCollectionType| CannotUpdatePKey| CannotUseInstrWithSideEffectInView| CollectionExpected| ContainerOfNonAsset| ContractInvariantInLocalSpec| CreateContractStorageDuplicatedField of Ident.ident| CreateContractStorageInvalidArgType| CreateContractStorageInvalidAssignOperator| CreateContractStorageInvalidField| CreateContractStorageMissingField of Ident.ident| CreateContractStorageRequireLitValueForConst of Ident.ident| CreateContractStorageUnknownField of Ident.ident| DetachInvalidExprFrom| DetachInvalidType of Ident.ident| DetachMatchInvalidPattern| DifferentMemoSizeForSaplingVerifyUpdate of int * int| DivergentExpr| DoesNotSupportMethodCall| DuplicatedArgName of Ident.ident| DuplicatedCtorName of Ident.ident| DuplicatedFieldInAssetDecl of Ident.ident| DuplicatedFieldInAssetOrRecordLiteral of Ident.ident| DuplicatedFieldInRecordDecl of Ident.ident| DuplicatedInitMarkForCtor| DuplicatedPackingVar of Ident.ident| DuplicatedPkeyField of Ident.ident| DuplicatedVarDecl of Ident.ident| EffectInGlobalSpec| EmptyEnumDecl| ExpressionExpected| FileNotFound of Ident.ident| ForeignState of Ident.ident option * Ident.ident option| FormulaExpected| FunctionInvalidInstructionVoid| FunctionInvalidTypeVoid| FunctionNoReturn| FunctionNotFound of Ident.ident| FunctionUnknownFunction of Ident.ident * Ident.ident| IncompatibleSpecSig| IncompatibleTypes of A.ptyp * A.ptyp| IndexOutOfBoundForTuple| InvalidApplicationKind of Ident.ident * Ident.ident| InvalidArcheTypeDecl| InvalidArgForGlobalConstant| InvalidArgumentType of A.ptyp * A.ptyp| InvalidArlFile| InvalidAssetCollectionExpr of A.ptyp| InvalidAssetExpression| InvalidAssetFieldTypeValueBigMap| InvalidAssetGetContainer of A.container| InvalidAssetInitIdBadType of string * A.ptyp * A.ptyp| InvalidAssetInitIdParamConst of string| InvalidAssetInitIdNotFound of string| InvalidCallByAsset| InvalidCallByExpression| InvalidContractValueForCreateContract| InvalidEffectForCtn of A.container * A.container list| InvalidEntryDescription| InvalidEntryExpression| InvalidEventType| InvalidExpression| InvalidExpressionForEffect| InvalidExprressionForTupleAccess| InvalidFailIdType of Ident.ident * A.ptyp * A.ptyp| InvalidFieldsCountInAssetOrRecordLiteral| InvalidFoldInit of A.ptyp| InvalidForIdentMap| InvalidForIdentSimple| InvalidFormula| InvalidInstruction| InvalidKeyFieldInAssetValueType| InvalidLiteralBytes| InvalidLValue| InvalidMapType| InvalidMethodInExec| InvalidMethodInFormula| InvalidMethodWithBigMap of Ident.ident| InvalidMethodWithIterableBigMap of Ident.ident| InvalidNumberOfArguments of int * int| InvalidNumberOfParameters of int * int| InvalidPackingExpr| InvalidPackingFormat| InvalidRecordFieldType| InvalidRoleExpression| InvalidSaplingEmptyStateArg| InvalidSecurityEntry| InvalidSecurityRole| InvalidSortingExpression| InvalidSourcedByAsset| InvalidSourcedByExpression| InvalidStateExpression| InvalidStorageType of A.ptyp * A.ptyp| InvalidStringValue| InvalidTezValueNeg| InvalidTezValueOverflow| InvalidTypeDeclOpt| InvalidTypeForAddressToContract| InvalidTypeForBigMapKey| InvalidTypeForBigMapValue| InvalidTypeForCallview| InvalidTypeForContract| InvalidTypeForDoFailIf| InvalidTypeForDoRequire| InvalidTypeForEntrypoint| InvalidTypeForFail| InvalidTypeForFailSome| InvalidTypeForGlobalConstant| InvalidTypeForLambdaArgument| InvalidTypeForLambdaReturn| InvalidTypeForMake| InvalidTypeForMakeEvent| InvalidTypeForMapKey| InvalidTypeForMapOperator of A.ptyp| InvalidTypeForMapValue| InvalidTypeForOptionalAssign| InvalidTypeForOrLeft| InvalidTypeForOrRight| InvalidTypeForParameter| InvalidTypeForPk| InvalidTypeForSet| InvalidTypeForTuple| InvalidTypePassable of A.ptyp| InvalidTypeStorable of A.ptyp| InvalidTzFile| InvalidValueForCurrency| InvalidValueForMemoSize| InvalidVariableForMethod| InvalidVarOrArgType| InvalidZeroValue| LabelInNonInvariant| LetInElseInInstruction| LetInElseOnNonOption| MethodCallInPredicate| MisorderedPkeyFields| MissingFieldInAssetOrRecordLiteral of Ident.ident| MixedAnonInAssetOrRecordLiteral| MixedFieldNamesInAssetOrRecordLiteral of longident list| MoreThanOneInitState of Ident.ident list| MultipleAssetStateDeclaration| MultipleInitialMarker| MultipleMatchingFunction of longident * A.ptyp list * (A.ptyp list * A.ptyp) list| MultipleMatchingOperator of PT.operator * A.ptyp list * opsig list| MultipleStateDeclaration| NameIsAlreadyBound of Ident.ident * Location.t option| NoLetInInstruction| NoMatchingFunction of longident * A.ptyp list| NoMatchingOperator of PT.operator * A.ptyp list| NonCodeLabel of Ident.ident| NonHomogeneousPattern of Ident.ident| NonIterable| NonIterableBigMapAsset of longident| NonLoopLabel of Ident.ident| NoSuchMethod of Ident.ident| NotAKeyOfType| NotAnAssetType| NotAnEnumType| NotAPrimitiveType| NotARole of Ident.ident| NumericExpressionExpected| NumericOrCurrencyExpressionExpected| OpInRecordLiteral| OrphanedLabel of Ident.ident| PackUnpackOnNonPrimitive| PartialMatch of Ident.ident list| PostConditionInGlobalSpec| ReadOnlyGlobal of Ident.ident| RecordExpected| RecordUpdateDuplicatedFieldName of Ident.ident| RecordUpdateOnNonRecordOrAsset| RecordUpdateOnPKey| RecordUpdateWithInvalidFieldName| ReturnInVoidContext| SecurityInExpr| SpecOperatorInExpr| StringLiteralExpected| TransferWithoutDest| UninitializedVar| UnknownAsset of Ident.ident| UnknownAssetToProperty of Ident.ident| UnknownCreateContractExtension of Ident.ident| UnknownEntry of Ident.ident| UnknownEnum of Ident.ident| UnknownFailId of Ident.ident| UnknownField of longident * Ident.ident| UnknownFieldName of Ident.ident| UnknownFunction of Ident.ident| UnknownGetter of Ident.ident| UnknownImport of Ident.ident| UnknownImportExtension of Ident.ident| UnknownLabel of Ident.ident| UnknownLocalOrVariable of longident| UnknownProcedure of Ident.ident| UnknownState of Ident.ident| UnknownTypeName of longident| UnknownVariable of Ident.ident| UnknownView of Ident.ident| UpdateEffectOnPkey| UpdateEffectWithoutDefault| UselessPattern| UsePkeyOfInsteadOfAsset| VarMultiInvalidTupleType of int| VarMultiInvalidType| ViewInvalidFsType of Ident.ident * Ident.ident| ViewInvalidReturnType| ViewInvalidVisibility| VoidMethodInExpr| VSetInExpr| VSetOnNonAsset
Source
type acttx = [ | `Entry of PT.entry_decl| `Transition of PT.transition_decl| `Getter of PT.getter_decl
]Source
type groups = {gr_archetypes : PT.lident Location.loced list;gr_imports : (PT.lident option * PT.lident) Location.loced list;gr_states : PT.enum_decl Location.loced list;gr_enums : (PT.lident * PT.enum_decl) Location.loced list;gr_assets : PT.asset_decl Location.loced list;gr_records : PT.record_decl Location.loced list;gr_events : PT.record_decl Location.loced list;gr_vars : PT.variable_decl Location.loced list;gr_funs : PT.s_function Location.loced list;gr_acttxs : acttx Location.loced list;
}Source
type ('args, 'rty) gmethod_ = {mth_name : A.const;mth_purity : [ `Pure | `Effect of A.container list ];mth_totality : [ `Total | `Partial ];mth_map_type : [ `Both | `Standard ];mth_sig : 'args * 'rty option;
}Source
type opinfo = {op_name : string;op_const : A.const;op_partial : [ `Partial | `Total ];op_thety : A.type_ option;op_sig : A.type_ list;op_resty : [ `Self | `Ty of A.type_ ];op_restr : Type.trestr Tools.Mint.t;op_filter : (A.type_ list -> A.pterm list -> bool) option;
}Source
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 ->
opinfoSource
type 'env importdecl = {id_name : A.lident;id_path : A.lident;id_content : Michelson.obj_micheline option;id_ast : A.ast option;id_entrypoints : (Ident.ident * A.type_) list;id_views : (Ident.ident * (A.type_ * A.type_)) list;id_funs : A.function_ list;id_env : 'env option;
}Source
val pp_importdecl :
'env. (Ppx_deriving_runtime.Format.formatter ->
'env ->
Ppx_deriving_runtime.unit) ->
Ppx_deriving_runtime.Format.formatter ->
'env importdecl ->
Ppx_deriving_runtime.unitSource
val show_importdecl :
'env. (Ppx_deriving_runtime.Format.formatter ->
'env ->
Ppx_deriving_runtime.unit) ->
'env importdecl ->
Ppx_deriving_runtime.stringSource
type assetdecl = {as_name : fullname;as_fields : fielddecl list;as_pkty : A.ptyp;as_pk : A.lident list;as_sortk : A.lident list;as_bm : A.map_kind;as_invs : (A.lident option * A.pterm) list;as_init : A.init_asset;
}Source
val pp_assetdecl :
Ppx_deriving_runtime.Format.formatter ->
assetdecl ->
Ppx_deriving_runtime.unitSource
val pp_fielddecl :
Ppx_deriving_runtime.Format.formatter ->
fielddecl ->
Ppx_deriving_runtime.unitSource
type recorddecl = {rd_name : fullname;rd_fields : rfielddecl list;rd_packing : rpacking option;
}Source
val pp_recorddecl :
Ppx_deriving_runtime.Format.formatter ->
recorddecl ->
Ppx_deriving_runtime.unitSource
val pp_rfielddecl :
Ppx_deriving_runtime.Format.formatter ->
rfielddecl ->
Ppx_deriving_runtime.unitSource
val pp_rpacking :
Ppx_deriving_runtime.Format.formatter ->
rpacking ->
Ppx_deriving_runtime.unitSource
type vardecl = {vr_name : A.longident;vr_type : A.ptyp;vr_kind : [ `Constant | `Variable | `Enum ];vr_def : (A.pterm * [ `Inline | `Std ]) option;vr_core : A.const option;
}Source
type fundecl = {fs_name : A.longident;fs_kind : A.fun_kind;fs_args : (A.lident * A.ptyp) list;fs_retty : A.returned_fun_type;fs_body : A.instruction;fs_side_effect : bool;fs_storage_usage : bool;
}Source
type txeffect = {tx_state : A.lident;tx_when : A.pterm option;tx_effect : A.instruction option;
}Source
type tentrydecl = {ad_name : A.lident;ad_args : (A.lident * A.ptyp) list;ad_getter : bool;ad_ret_t : A.ptyp option;ad_srcby : (A.pterm option Location.loced list * A.pterm option) Location.loced;ad_callby : (A.pterm option Location.loced list * A.pterm option) Location.loced;ad_stateis : (A.lident * A.pterm option) Location.loced option;ad_effect : [ `Raw of A.instruction | `Tx of transition ] option;ad_funs : fundecl option list;ad_csts : (A.lident option * A.pterm * A.pterm option) Location.loced list;ad_reqs : (A.lident option * A.pterm * A.pterm option) Location.loced list;ad_fais : (A.lident option * A.pterm * A.pterm option) Location.loced list;ad_actfs : bool * A.pterm option;ad_loc : Location.t;
}Source
type statedecl = {sd_name : A.longident;sd_state : bool;sd_ctors : ctordecl list;sd_init : Ident.ident;
}Source
type capture = {cp_global : bool;cp_local : [ `Only of Ident.Sid.t | `Yes of (L.t * A.ptyp) Ident.Mid.t ref option ];
}Source
val for_xexpr :
emode_t ->
?autoview:bool ->
?capture:capture ->
env ->
?ety:A.ptyp ->
PT.expr ->
A.pterm_node A.struct_polySource
val for_asset_expr :
emode_t ->
env ->
PT.expr ->
A.pterm_node A.struct_poly * Env.asset optionSource
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) optionSource
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)
optionSource
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.ptermSource
val for_named_state :
Location.t ->
?enum:Ident.ident ->
env ->
PT.lident ->
Ident.ident Location.locedSource
val named_sig_compatible :
('a Location.loced * A.ptyp) option list ->
('a Location.loced * A.ptyp) option list ->
boolSource
val for_callby :
Location.t ->
env ->
[< `Called | `Sourced ] ->
PT.expr ->
A.pterm_node A.struct_poly option Location.loced listSource
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)Source
val for_core_enum_decl :
env ->
enum_core Location.loced ->
env * (Ident.ident * (PT.lident * A.ptyp list) list) optionSource
val for_enum_decl :
env ->
(PT.lident * PT.enum_decl) Location.loced ->
env * statedecl optionSource
val for_enums_decl :
env ->
(PT.lident * PT.enum_decl) Location.loced list ->
env * statedecl option listSource
val for_vardecls_init :
env ->
PT.variable_decl Location.loced list ->
env * vardecl option listSource
val for_asset_decl :
Ident.ident list ->
env ->
(assetdecl * PT.asset_decl Location.loced) ->
Env.t * pre_assetdecl optionSource
val for_record_decl :
[< `Event | `Record ] ->
env ->
PT.record_decl Location.loced ->
env * recorddecl optionSource
val for_records_decl :
env ->
PT.record_decl Location.loced list ->
env * recorddecl option listSource
val for_events_decl :
env ->
PT.record_decl Location.loced list ->
env * recorddecl option listSource
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.locedSource
type decls = {state : statedecl option;variables : vardecl option list;enums : statedecl option list;records : recorddecl option list;events : recorddecl option list;assets : assetdecl option list;functions : fundecl option list;acttxs : tentrydecl option list;
}Source
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 listSource
val get_arl_header :
PT.archetype_unloc Location.loced ->
((PT.lident * PT.parameters * PT.metadata option) * PT.declaration list)
optionSource
val for_declarations :
?init:PT.expr_unloc Location.loced ->
env ->
PT.archetype_unloc Location.loced ->
env * A.astSource
val typing :
?init:PT.expr_unloc Location.loced ->
(A.lident -> env) ->
PT.archetype ->
env * A.ast