pub struct FunctionSignature {
pub name: SmolStr,
pub params: Vec<ParamDecl>,
pub variadic: Option<ParamDecl>,
pub return_ty: ReturnTy,
pub categories: FnCategories,
}Expand description
A function catalog entry.
The return type is modelled as a closure so consumers can express
signature-dependent return inference (e.g., coalesce(T, T) -> T).
Signature-independent functions return a constant.
Spec deviation note (§8.2): the spec’s shorthand is
variadic: Option<Type>; we use ParamDecl so the trailing
variadic parameter can carry a name and default consistently with
params. Only variadic.ty is semantically significant; name is
diagnostic-only and default is unused.
Fields§
§name: SmolStrFunction name as it appears in a count(…) call.
params: Vec<ParamDecl>Fixed-arity parameter list in declaration order.
variadic: Option<ParamDecl>Optional trailing variadic parameter (spec §8.2 shorthand).
return_ty: ReturnTyHow the return type is computed (constant vs argument-derived).
categories: FnCategoriesPurity / determinism flags used by the sema purity checker.