Explorer

definy.closure-references

description
result followed by the references of the parts from index (definy.closure-part-references). fallback if one of them needs the evaluator
type
Fn(
  parts: List<@definy.stored-snapshot-part>,
  resolutions: List<@definy.resolution-cache-entry>,
  definitions: List<@definy.definition-cache-entry>,
  types_only: Boolean
) -> Union{#fallback, #refs(List<String>)}
expression
fn(parts$0, resolutions$1, definitions$2, types_only$3) =>
  let resolution_index$4 = @definy.resolution-index(resolutions: $1);
  @core.list-fold(
    T: @definy.stored-snapshot-part,
    A: Union{#fallback, #refs(List<String>)},
    reducer: fn(acc$5, item$6) =>
      match $5 {
        #fallback(_) =>
          #fallback,
        #refs(refs$7) =>
          match @definy.closure-part-references(part: $6, resolutions: $4, definitions: $2, types_only: $3) {
            #fallback(_) =>
              #fallback,
            #refs(more$8) =>
              #refs(@core.list-concat(left: $7, right: $8))
          }
      },
    init: #refs([]),
    xs: $0
  )
visibility
public
definy.closure-references (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo)
id: 521J9EQ207ZJUj8O4ComRu0cv_lxG4v9OTu2yMr0Y9c
content hash: x2JW-JUX5dTItwAjLutG_TqLETKQ8OWIRS3fP4UCWXQ