API reference
python:irx:irx.analysis.types
module types
irx.analysis.types
Source: packages/irx/src/irx/analysis/types.py:1
Type helpers for semantic analysis.
Provide the small AST-type predicates and promotion helpers that the semantic analyzer reuses across many node visitors.
Functions
-
_metadata_assignment_compatible — Return whether assignment metadata is statically compatible.
-
_same_optional_shape — Return whether optional tensor shapes are compatible.
-
_same_optional_size — Return whether optional collection sizes are compatible.
-
_target_accepts_known_shape — Return whether a target shape accepts a value shape.
-
_target_accepts_known_size — Return whether a target size accepts a value size.
-
bit_width — Return the nominal bit width for numeric types.
-
clone_type — Clone an AST type by class.
-
common_numeric_type — Return a widened numeric type shared by both operands.
-
contains_file_type — Detect unsupported nested native-file storage.
-
contains_sequence — Find borrowed sequence storage inside supported composite types.
-
contains_template_variables — Discover unresolved variables recursively in supported annotations.
-
display_type_name — Return one stable human-facing type name.
-
float_promotion_width_for_integer_width — Select raw LLVM storage width, not a lossless language promotion.
-
is_assignable — Return whether a value type can be assigned to a target type.
-
is_boolean_type — Is boolean type.
-
is_explicitly_castable — Return whether an explicit Cast expression is allowed.
-
is_float_type — Is float type.
-
is_integer_type — Is integer type.
-
is_none_type — Is none type.
-
is_numeric_type — Is numeric type.
-
is_sequence_element — Accept fixed-width numeric scalars, optionally nullable, not Boolean.
-
is_signed_integer_type — Is signed integer type.
-
is_string_type — Is string type.
-
is_temporal_type — Is temporal type.
-
is_type_member — Return whether a value type is a member of a target type.
-
is_unsigned_type — Is unsigned type.
-
requires_shape_check — Return whether assignment requires a runtime shape check.
-
requires_size_check — Return whether assignment requires a runtime size check.
-
same_type — Return whether two AST types share the same class.
-
sequence_element_type — Return the exact element contract for a supported sized source.
-
substitute_type — Recursively substitute concrete template arguments in supported types.
-
union_storage_type — Select a lossless untagged union representation during analysis.