Explorer

core.callee-to-value

description
Turn core.callee into a value of the evaluator (core.value). The inverse of core.value-to-callee (generated by scripts/generate_value_decoders.ts)
type
Fn(value: @core.callee) -> @core.value
expression
fn(value$0) =>
  match $0 {
    #part_reference(payload$1) =>
      #variant<@core.value>({
        tag: "part_reference",
        payload: #record<@core.value>([{key: "part_definition_event_hash", value: #string<@core.value>($1.part_definition_event_hash)}])
      }),
    #builtin(payload$2) =>
      #variant<@core.value>({tag: "builtin", payload: #string<@core.value>($2)}),
    #variable(payload$3) =>
      #variant<@core.value>({
        tag: "variable",
        payload: #record<@core.value>([{key: "variable_id", value: #number<@core.value>($3.variable_id)}])
      }),
    #record_get(payload$4) =>
      #variant<@core.value>({
        tag: "record_get",
        payload: #record<@core.value>([
          {key: "record", value: @core.expression-to-value(value: $4.record)},
          {key: "key", value: #string<@core.value>($4.key)}
        ])
      })
  }
visibility
public
core.callee-to-value (project definy, branch auto-release, snapshot oiQgPqhJm-TbM4kexXeRHBaJB_tS7gwBSewII64P-44)
id: IDCkEFC6C36GkpQaCcG_tHQj8Zp7Mc33ScUVDdUppZs
content hash: Bn4g5jHDojqR-q0iUh_p07JXLNAfmjS_8m6zSZJMJ0w