Add types.sx gradual type system spec module with 44 tests

Implements subtype checking, type inference, type narrowing, and
component call-site checking. All type logic is in types.sx (spec),
bootstrapped to every host. Adds test-types.sx with full coverage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-11 17:06:09 +00:00
parent 4c4806c8dd
commit e5dbe9f3da
6 changed files with 979 additions and 448 deletions

View File

@@ -170,6 +170,7 @@ class Component:
deps: set[str] = field(default_factory=set) # transitive component deps (~names)
io_refs: set[str] | None = None # transitive IO primitive refs (None = not computed)
affinity: str = "auto" # "auto" | "client" | "server"
param_types: dict[str, Any] | None = None # {param_name: type_expr} for gradual typing
@property
def is_pure(self) -> bool: