Module helpers

Source

Functionsยง

bool_type
Helper functions for common type checking operations. This module provides utility functions that are shared across different operation types. Creates a boolean type ID. This is a convenience function used by relational and logical operations.
is_boolean_type
Checks if a type is a boolean type. This is used by logical operations.
is_numeric_type
Checks if a type is a numeric type (integer or float). This is used to validate operations that only work on numeric types.
is_string_type
Checks if a type is a string type. String types have special rules for the addition operator (concatenation).
is_unit_type
Checks if a type is the unit type. Unit types are not allowed in most operations.
is_unspecified_float_type
Checks if a type is an unspecified float literal. These can be coerced to specific float types.
is_unspecified_integer_type
Checks if a type is an unspecified integer literal. These can be coerced to specific integer types.
logical_operator_type_mismatch_error
Creates a logical operator type mismatch error. This is a convenience function for logical operations that require boolean operands.
operation_type_mismatch_error
Creates an operation type mismatch error. This is a convenience function to create consistent error messages across operations.
types_are_identical
Checks if two types are identical. This is used by operations that require exact type matches.