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:
@@ -307,6 +307,14 @@ def component_affinity(c):
|
||||
return getattr(c, 'affinity', 'auto')
|
||||
|
||||
|
||||
def component_param_types(c):
|
||||
return getattr(c, 'param_types', None)
|
||||
|
||||
|
||||
def component_set_param_types(c, d):
|
||||
c.param_types = d
|
||||
|
||||
|
||||
def macro_params(m):
|
||||
return m.params
|
||||
|
||||
@@ -1428,6 +1436,7 @@ SPEC_MODULES = {
|
||||
"router": ("router.sx", "router (client-side route matching)"),
|
||||
"engine": ("engine.sx", "engine (fetch/swap/trigger pure logic)"),
|
||||
"signals": ("signals.sx", "signals (reactive signal runtime)"),
|
||||
"types": ("types.sx", "types (gradual type system)"),
|
||||
}
|
||||
|
||||
EXTENSION_NAMES = {"continuations"}
|
||||
|
||||
Reference in New Issue
Block a user