fn(entries$0, index$1, accum$2) =>
match @core.list-get(list: $0, index: $1) {
#none(_) =>
$2,
#some(item$1007) =>
let entry$3 = $1007;
match @core.type-declaration-to-type-ast(expr: $3.part_type) {
#none(_) =>
@core.build-type-env-parts(entries: $0, index: @core.plus(left: $1, right: 1), accum: $2),
#some(part_type$7) =>
let with_type$4 = @core.list-append(list: $2, item: {part_definition_event_hash: $3.part_definition_event_hash, part_type: $7});
@core.build-type-env-parts(
entries: $0,
index: @core.plus(left: $1, right: 1),
accum: match $3.type_declaration {
#none(_) =>
$4,
#some(declaration$5) =>
match @core.type-declaration-to-type-ast(expr: $5) {
#none(_) =>
$4,
#some(declared$6) =>
@core.list-append(
list: $4,
item: {
part_definition_event_hash: @core.string-concat(left: $3.part_definition_event_hash, right: "#definition"),
part_type: $6
}
)
}
}
)
}
}