You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(lowering): carry let-annotation for Deque/SortedMap/SortedSet (E0282)
`lower_let_annotation`'s generic-container allowlist included List/Map/Set/
Option/Result/Channel but omitted `Deque`, `SortedMap`, and `SortedSet`. A
`let v: Deque<Float> = Deque.new<Float>()` whose only use was `len()` therefore
dropped its annotation and lowered to an un-inferable `VecDeque<_>` — the checker
ACCEPTED it and the VM ran it, but the compiled backend failed to build
(E0282: type annotations needed). That violates the "valid RSScript -> valid
Rust" contract. Add the three missing containers so every generic container
carries its element type into Rust.
Found by the rss-testgen generative differential (full N-way incl. compiled).
Regression test in checker_lowering covers all three containers. The generator's
bug-workarounds (always-populate collections; collections excluded from arbitrary
type positions) are dropped now that empty annotated collections lower.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: TODO.md
+138Lines changed: 138 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,3 +8,141 @@ _Every item says **why** — if you can't fill in a why, it doesn't belong here.
8
8
-**Stream / lazy Iter** = the deferred performance path. Blueprint: a lazy iterator is `struct Iter[X] { next: () -> Option<X> }`, combinators wrap the next-closure → lazy fusion, zero intermediates. _Why parked / why noted:_ it's the "Stream for performance" we split off from the eager Pipeline; record the design so it's ready, **with the review-first caveats**: it's mutate-on-read / consume-once (hidden-state hazard), and prefer explicit loops over callback-iteration (even mature lazy-iterator libraries are moving away from it).
9
9
- Keep the `try_` surface **small** (don't generate try_ variants; let pipeline's `FalliblePipeline` cover the common case). _Why:_ error-polymorphism (inferring fallibility from the callback) would collapse the `try_` surface, but RSS pays explicit fallibility with duplication, so the price must stay bounded (Article II).
10
10
-`read` omittable-default decision (§2A.3, recorded); pattern extras (`|`, range, `as`/`@`); **map-pattern via a `get(Self,K)->Option<V>` protocol** (defers protocol-dispatched patterns — much heavier semantics than struct/sum, and the interpreter doesn't need it); shared Iter protocol to collapse ×collections. _Why parked:_ not on the dogfooding critical path; revisit when a real program demands them.
11
+
12
+
## tinygrad port feedback
13
+
14
+
These items came from the tinygrad RSScript/modern-c port. They are not abstract
15
+
language wish-list items: each one removes a current source-port workaround or
0 commit comments