fn(commit$0, parts$1, latest$2, then$3) =>
let hashes$4 = @core.list-concat(
left: @core.list-map(
T: @definy.stored-snapshot-part,
U: String,
f: fn(item$5) =>
$5.content_hash,
xs: $1
),
right: @definy.snapshot-parts-hashes(
parts_list: @core.list-map(
T: @definy.event-snapshot,
U: List<@definy.stored-snapshot-part>,
f: fn(item$6) =>
@definy.snapshot-parts(modules: $6.commit.modules, index: 0),
xs: $2
),
index: 0
)
);
@definy.read-resolutions(
content_hashes: $4,
then: fn(resolutions$7) =>
@definy.read-definitions(
content_hashes: @definy.unresolved-hashes(hashes: $4, resolutions: $7),
then: fn(definitions$8) =>
$3(
input: #some({
project_name: $0.project_name,
parts: @core.list-map(
T: @definy.stored-snapshot-part,
U: @definy.snapshot-check-source-part,
f: fn(item$9) =>
@definy.source-part-of(part: $9, definitions: $8),
xs: $1
),
latest_commits: @core.list-map(
T: @definy.event-snapshot,
U: @definy.latest-snapshot-source,
f: fn(item$10) =>
{
project_name: $10.commit.project_name,
parts: @core.list-map(
T: @definy.stored-snapshot-part,
U: @definy.snapshot-check-source-part,
f: fn(item$11) =>
@definy.source-part-of(part: $11, definitions: $8),
xs: @definy.snapshot-parts(modules: $10.commit.modules, index: 0)
)
},
xs: $2
),
project_module_ids: @definy.project-module-ids(commits: $2, project_name: $0.project_name, index: 0),
resolutions: $7
}),
commit: #some($0)
)
)
)