Explorer

core.expression-contains-hole

description
Whether the expression (including types and quoted expressions) has an unfilled hole
type
Fn(expr: @core.expression) -> Boolean
expression
fn(expr$0) =>
  match $0 {
    #hole(_) =>
      true,
    _ =>
      @core.expression-list-contains-hole(
        items: match $0 {
          #type_list(list_type$1) =>
            [$1.item_type],
          #type_code(code_type$2) =>
            [$2.value_type],
          #type_function(function_type$3) =>
            @core.list-append(
              list: @core.type-function-parameter-types(parameters: $3.parameters, index: 0),
              item: $3.return_type
            ),
          #type_record(fields$4) =>
            @core.record-item-values(items: $4, index: 0),
          #type_union(variants$5) =>
            @core.type-union-payload-types(variants: $5, index: 0),
          #quote(quoted$6) =>
            [$6],
          _ =>
            @core.expression-children(expr: $0)
        },
        index: 0
      )
  }
visibility
public
core.expression-contains-hole (project definy, branch main, snapshot CfIAXM725tR74SWd4aoTUz4-JJQfqnllblZbQ2Sv204)
id: w_XqgYvQAv8orkqXCmtt87kXVOwyN9VgC5PDaOVGANI
content hash: Pp_t2Icu9Qx3zc162aE3vwhkRv4eZt_vxcrNlsJJUDo