charon icon indicating copy to clipboard operation
charon copied to clipboard

Make built-in functions less special

Open Nadrieril opened this issue 1 year ago • 1 comments

Today, built-in functions and place operations are represented as FunId::Assumed. Since they don't correspond to a normal FunDecl, consumers must know the correct type signature to use. We could instead declare a FunDecl with a special kind, so that users don't need to handle these builtins unless they care.

Nadrieril avatar Jun 06 '24 11:06 Nadrieril

First step for that is #864. Second step would be to make FunDeclId into an enum

enum FunDeclId {
  Intrinsic(Intrinsic),
  Indexed(usize),
}

so that users can choose to pattern-match on the id if they wish. Once that's done we can include the built-in functions there too, though they might have to be replaced by something else first.

Nadrieril avatar Oct 22 '25 19:10 Nadrieril