Explorer

definy.snapshot-check-parts-of

description
The parts to check with their contents. The definitions of the evaluated parts are type-checked (definition_check)
type
Fn(
  sources: List<@definy.snapshot-check-source-part>,
  contents: List<@definy.resolved-part-content>,
  evaluated: List<String>
) -> List<@definy.snapshot-check-part>
expression
fn(sources$0, contents$1, evaluated$2) =>
  let content_index$9500 = @core.list-hash-index(list: $1, field: "id");
  let evaluated_set$9501 = @core.string-set(items: $2);
  @core.list-map(
    T: @definy.snapshot-check-source-part,
    U: @definy.snapshot-check-part,
    f: fn(item$3) =>
      {
        id: $3.id,
        name: $3.name,
        module_name: $3.module_name,
        module_id: $3.module_id,
        module_visibility: $3.module_visibility,
        content_hash: $3.content_hash,
        content: match @core.list-hash-index-find(index: $9500, field: "id", value: $3.id) {
          #some(found$9502) =>
            #some($9502.content),
          #none(_) =>
            #none
        },
        definition_check: match @core.string-set-has(set: $9501, value: $3.id) {
          true =>
            $3.definition,
          false =>
            #none
        }
      },
    xs: $0
  )
visibility
public
definy.snapshot-check-parts-of (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo)
id: _ole5GsAEpD5O2Zzi_uan5jsK937Ztu4nJMUlBTlH3Y
content hash: i-m38dbDiIgXuorXpzO0x_GlGlVSPNFkvvuRv6kFqWw