Projects / definy / compiled-tests core.part-type-lookup description Lookup declared type of a part in the type environment's index of parts (core.build-type-env makes it with list_hash_index; the last entry with the hash wins) type Fn(
env: List<List<Record{part_definition_event_hash: String, part_type: @core.type-ast }>>,
part_hash: String
) -> @core.type-result expression fn(env$0, part_hash$1) =>
match @core.list-hash-index-find (index: $0, field: "part_definition_event_hash", value: $1) {
#none(_) =>
#error(#part_not_found({part_definition_event_hash: $1})),
#some(entry$2) =>
#ok($2.part_type)
} visibility public core.part-type-lookup (project definy, branch compiled-tests, snapshot i6TqClmqVS9FK8rKOvJ43l6Tevx8pvYJ5-zaQqNwemc)
id: Tf9ZjjOYL0UPM6xKgMiwlafSgYzbFSkPfvF2inS2eHI
content hash: AtZsKfK283LYThpiSrqaVD-eLOsdiGb7SMbAU6h8pSg