Crate ruka_types

Source
Expand description

Shared semantic types used across compiler crates.

Modulesยง

coercion ๐Ÿ”’
ownership ๐Ÿ”’

Structsยง

NormalizedTy
Normalized ownership representation used by checker and lowering boundaries.

Enumsยง

AccessMode
Access intent associated with one normalized type at a usage boundary.
BaseTy
Pure type identity without ownership or mutability semantics.
CheckPolicy
Runtime check requirement for one coercion.
CoercionDecision
Coercion decision returned by the normalized compatibility table.
MaterializationKind
Materialization category used by lowering.
MaterializationPolicy
Materialization requirement for one coercion.
NormalizeError
Error returned when converting semantic type shapes into normalized forms.
RuntimeCheckKind
Runtime check category used by coercion planning.
Ty
Semantic type assigned by checking and consumed by lower IRs/backends.

Functionsยง

boundary_coercion_decision
Compute coercion compatibility for one boundary where access mode is tracked separately.
can_safely_coerce_numeric
Return whether numeric value from can be converted into to without loss.
float_width ๐Ÿ”’
integer_width ๐Ÿ”’
is_signed_integer ๐Ÿ”’
Return whether integer type is signed.
is_truncation_cast
Return whether source to target represents a narrowing truncation cast.
normalize_ty
Normalize one type by extracting top-level reference ownership.
normalize_ty_with_access
Normalize one type using one explicit boundary access mode.
normalized_coercion_decision
Compute coercion compatibility for two normalized types.
promote_numeric_types
Return promoted numeric type for mixed arithmetic operands.
signed_ty_for_width ๐Ÿ”’
Return signed integer type for width.
ty_coercion_decision
Compute normalized coercion compatibility for two semantic types.
unsigned_ty_for_width ๐Ÿ”’
Return unsigned integer type for width.