charon
charon copied to clipboard
Make built-in functions less special
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.
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.