fn(modules$0, module_name$1, name$2, content_hash$3) =>
match @core.list-fold(
T: @core.project-snapshot-module,
A: Boolean,
reducer: fn(acc$4, item$5) =>
@core.or(left: $4, right: @core.equal(left: $5.name, right: $1)),
init: false,
xs: $0
) {
true =>
@core.list-map(
T: @core.project-snapshot-module,
U: @core.project-snapshot-module,
f: fn(item$6) =>
match @core.equal(left: $6.name, right: $1) {
true =>
{
name: $6.name,
description: $6.description,
visibility: $6.visibility,
parts: @definy.apply-module-part-change(parts: $6.parts, name: $2, content_hash: $3)
},
false =>
$6
},
xs: $0
),
false =>
match $3 {
#none(_) =>
$0,
#some(hash$7) =>
@core.list-append(list: $0, item: @definy.new-snapshot-module(name: $1, part_name: $2, content_hash: $7))
}
}