Explorer

definy.snapshot-check-part-builtin

description
Whether the part is a compiler builtin: its expression is a builtin expression (core.plus and so on), or it is a type part without an expression (builtin types such as core.number). It is decided by the definition, not by the module or the account
type
Fn(part: @definy.snapshot-check-part) -> Boolean
expression
fn(part$0) =>
  match $0.content {
    #some(content$1) =>
      match $1.expression {
        #none(_) =>
          match $1.part_type {
            #some(part_type$2) =>
              @core.is-type-part-type(part_type: $2),
            #none(_) =>
              false
          },
        _ =>
          match $1.expression {
            #some(#builtin(_)) =>
              true,
            _ =>
              false
          }
      },
    #none(_) =>
      false
  }
visibility
public
definy.snapshot-check-part-builtin (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo)
id: he72ikuyyPcveFGgS4dwe9b_J6iWrwliLs_BzVtMlXA
content hash: pVdGt-e2y4e3WyUvvvqiWwo9bToRbCDUtwpADH57_f4