fn(expr$0, ids$1) =>
match $0 {
#part_reference(reference$2) =>
match @core.list-contains-string(list: $1, target: $2.part_definition_event_hash, index: 0) {
true =>
$1,
false =>
@core.list-append(list: $1, item: $2.part_definition_event_hash)
},
#quote(_) =>
$1,
_ =>
@core.list-fold(
T: @core.expression,
A: List<String>,
reducer: fn(acc$8, item$9) =>
@core.compile-part-references(expr: $9, ids: $8),
init: $1,
xs: match $0 {
#type_list(list_type$3) =>
[$3.item_type],
#type_code(list_type$3) =>
[$3.value_type],
#type_function(function_type$4) =>
@core.list-append(
list: @core.type-function-parameter-types(parameters: $4.parameters, index: 0),
item: $4.return_type
),
#type_record(fields$5) =>
@core.record-item-values(items: $5, index: 0),
#type_union(variants$6) =>
@core.type-union-payload-types(variants: $6, index: 0),
_ =>
@core.expression-children(expr: $0)
}
)
}