pub struct Def {Show 16 fields
pub name: Arc<str>,
pub typarams: Vec<Arc<str>>,
pub params: Vec<(VarId, Arc<str>, Ty)>,
pub ret: Ty,
pub body: Core,
pub tier: Tier,
pub effects: Vec<Effect>,
pub row: Row,
pub declared_effects: Vec<Effect>,
pub bounds: Vec<(Arc<str>, Vec<Arc<str>>)>,
pub row_is_declared: bool,
pub tier_is_annotated: bool,
pub is_declaration: bool,
pub declares_signal: bool,
pub span: Span,
pub tier_span: Span,
}Fields§
§name: Arc<str>§typarams: Vec<Arc<str>>The names in def map[T, U](…), in the order written.
Carried on the Def rather than left in the scheme because beck iface publishes it: a
.becki line that dropped the [T, U] would read back as a signature mentioning two types
nobody declared (docs/32 §32.8).
params: Vec<(VarId, Arc<str>, Ty)>§ret: Ty§body: CoreThe whole definition as a lambda, so evaluating the name yields a callable value.
tier: Tier§effects: Vec<Effect>The inferred row’s atoms, resolved and sorted — what placement and the infrastructure derivation read.
row: RowThe inferred row itself, variables and all. This is the signature §3.6 publishes.
declared_effects: Vec<Effect>What the signature declared with uses, if anything.
bounds: Vec<(Arc<str>, Vec<Arc<str>>)>The trait bounds on this definition’s type parameters, in written order.
Empty for almost everything. A bounded definition is not published: its dictionary
parameters carry names no source could write, and a trait does not cross a module boundary,
so beck iface drops it rather than publishing a signature nobody could call.
row_is_declared: boolTrue when the signature stated its row — so an empty one is a bound of “performs nothing” rather than an absent declaration.
A hand-written def with no uses has this false, because writing nothing means “infer
it”. A trait method’s row is stated by the trait, empty or not, so every impl method has it
true: otherwise def show(self) -> Str would let one implementation reach for a clock and
every caller of show would inherit it silently.
tier_is_annotated: boolTrue when the placement was written by hand rather than solved for (§3.4).
is_declaration: boolA signature with nothing behind it: a line of a .becki interface, or a trait’s method.
declares_signal: bool@signal — a declaration that publishes a signal rather than a function (§3.6).
span: Span§tier_span: Span