Explorer

definy.content-type-check-entry

description
The entry of the type checker (core.type-checker) for a part with the content. The expression is kept only for type parts and compiler built-ins
type
Fn(part_id: String, module_id: String, content_hash: String, content: @core.part-content) -> @definy.type-check-entry
expression
fn(part_id$0, module_id$1, content_hash$2, content$3) =>
  let refs_from_type$4 = match $3.part_type {
      #none(_) =>
        [],
      #some(t$6) =>
        @core.expression-part-references(expr: $6, ids: [])
    };
  let refs_all$5 = match $3.expression {
      #none(_) =>
        $4,
      #some(e$7) =>
        @core.expression-part-references(expr: $7, ids: $4)
    };
  {
    part_id: $0,
    module_id: $1,
    part_type: match match $3.expression {
        #some(#builtin(_)) =>
          true,
        _ =>
          false
      } {
      true =>
        $3.expression,
      false =>
        $3.part_type
    },
    type_declaration: match $3.part_type {
      #some(part_type$4) =>
        match @core.is-type-part-type(part_type: $4) {
          true =>
            $3.expression,
          false =>
            #none
        },
      #none(_) =>
        #none
    },
    expression_key: #some($2),
    has_expression: match $3.expression {
      #some(_) =>
        true,
      #none(_) =>
        false
    },
    references: $5
  }
visibility
public
definy.content-type-check-entry (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo)
id: Ft8-VxTL-23Nl51ay9LkTkS8ynrk7R3DaMSOV34QPHQ
content hash: aZqS7cFoKOUgchsgFiNAArr6R3grrmHi6zcVKdogi3U