Fn(
previous: List<List<Record{
part_id: String,
module_id: String,
part_type: Union{#none, #some(@core.expression)},
type_declaration: Union{#none, #some(@core.expression)},
expression_key: Union{#none, #some(String)},
has_expression: Boolean,
references: List<String>
}>>,
committed: List<Record{
part_id: String,
module_id: String,
part_type: Union{#none, #some(@core.expression)},
type_declaration: Union{#none, #some(@core.expression)},
expression_key: Union{#none, #some(String)},
has_expression: Boolean,
references: List<String>
}>,
affected: List<List<Record{key: String}>>,
index: Number,
to_check: List<String>,
without_expression: List<String>
) -> Record{to_check: List<String>, without_expression: List<String>}fn(previous$0, committed$1, affected$2, index$3, to_check$4, without_expression$5) =>
match @core.list-get(list: $1, index: $3) {
#none(_) =>
{to_check: $4, without_expression: $5},
#some(entry$6) =>
let unchanged$7 = match @core.module-entry-lookup(entries: $0, part_id: $6.part_id) {
#none(_) =>
false,
#some(before$8) =>
@core.option-string-equals(a: $8.expression_key, b: $6.expression_key)
};
match $7 {
true =>
match @core.string-set-has(set: $2, value: $6.part_id) {
true =>
match $6.part_type {
#none(_) =>
@core.module-commit-classify(
previous: $0,
committed: $1,
affected: $2,
index: @core.plus(left: $3, right: 1),
to_check: $4,
without_expression: @core.list-append(list: $5, item: $6.part_id)
),
#some(_) =>
match $6.has_expression {
true =>
@core.module-commit-classify(
previous: $0,
committed: $1,
affected: $2,
index: @core.plus(left: $3, right: 1),
to_check: @core.list-append(list: $4, item: $6.part_id),
without_expression: $5
),
false =>
@core.module-commit-classify(
previous: $0,
committed: $1,
affected: $2,
index: @core.plus(left: $3, right: 1),
to_check: $4,
without_expression: @core.list-append(list: $5, item: $6.part_id)
)
}
},
false =>
@core.module-commit-classify(
previous: $0,
committed: $1,
affected: $2,
index: @core.plus(left: $3, right: 1),
to_check: $4,
without_expression: $5
)
},
false =>
match $6.part_type {
#none(_) =>
@core.module-commit-classify(
previous: $0,
committed: $1,
affected: $2,
index: @core.plus(left: $3, right: 1),
to_check: $4,
without_expression: @core.list-append(list: $5, item: $6.part_id)
),
#some(_) =>
match $6.has_expression {
true =>
@core.module-commit-classify(
previous: $0,
committed: $1,
affected: $2,
index: @core.plus(left: $3, right: 1),
to_check: @core.list-append(list: $4, item: $6.part_id),
without_expression: $5
),
false =>
@core.module-commit-classify(
previous: $0,
committed: $1,
affected: $2,
index: @core.plus(left: $3, right: 1),
to_check: $4,
without_expression: @core.list-append(list: $5, item: $6.part_id)
)
}
}
}
}