fn(value$0, declaration$1, declarations$2) =>
match $1 {
#type_number(_) =>
match $0 {
#number(v$10) =>
true,
_ =>
false
},
#type_float(_) =>
match $0 {
#float(v$10) =>
true,
_ =>
false
},
#type_string(_) =>
match $0 {
#string(v$10) =>
true,
_ =>
false
},
#type_boolean(_) =>
match $0 {
#boolean(v$10) =>
true,
_ =>
false
},
#type_list(list_type$3) =>
match $0 {
#list(items$11) =>
@core.value-list-items-conform(items: $11, item_type: $3.item_type, declarations: $2, index: 0),
_ =>
false
},
#type_record(declared$4) =>
match $0 {
#record(fields$12) =>
@core.and(
left: @core.value-record-keys-declared(fields: $12, declared: $4, index: 0),
right: @core.value-record-fields-conform(fields: $12, declared: $4, declarations: $2, index: 0)
),
_ =>
false
},
#type_union(variants$5) =>
match $0 {
#variant(variant$13) =>
match @core.declared-variant-find(variants: $5, tag: $13.tag, index: 0) {
#none(_) =>
false,
#some(declared_variant$14) =>
match $14.payload_type {
#none(_) =>
match $13.payload {
#unit(_) =>
true,
_ =>
false
},
#some(payload_type$15) =>
@core.value-conforms(value: $13.payload, declaration: $15, declarations: $2)
}
},
_ =>
false
},
#part_reference(reference$6) =>
match @core.type-declaration-find(declarations: $2, id: $6.part_definition_event_hash, index: 0) {
#none(_) =>
true,
#some(found$16) =>
@core.value-conforms(value: $0, declaration: $16, declarations: $2)
},
_ =>
true
}