API reference
python:arxjit:arxjit.reconcile.resolve_signature
function resolve_signature
resolve_signature(extracted: ExtractedSource, explicit: Signature | None = None) -> tuple[Signature | None, list[Diagnostic]]
Source: packages/arxjit/src/arxjit/reconcile.py:320
Decide the Signature a validated function compiles against.
An explicit signature decides the argument and return types outright and the annotations are not even read, so a function may annotate freely (or not at all) without having to agree with it; there is deliberately no type-mismatch error. It does not override the structure of the definition: the argument shape and the number of parameters are checked against the function first, on both paths, because those are facts rather than choices. Without an explicit signature, the annotations are used; int, float and bool are reserved spellings there, so see _annotation_type for why they are not resolved through the defining namespace. The returned signature is None exactly when the returned diagnostics are non- empty, which is the caller's signal that the function cannot be compiled.
Parameters
-
extracted — Type: ExtractedSource; A function that has already passed validation.
-
explicit — Type: Signature | None; The signature= passed to @jit, when given.
Returns
Type: tuple[Signature | None, list[Diagnostic]]