plum

#treesitter#compiler#wasm

git clone https://git.pyrossh.dev/plum

A statically typed, imperative programming language inspired by rust, python


ecd2178Peter John 2026-08-10T13:23:00+05:30
docs: update README known-gaps and close out wasm-gc migration plan
README.md CHANGED
@@ -347,4 +347,4 @@ Full example: [`examples/strings.plum`](examples/strings.plum).
347
347
  Some things parse and type-check but don't compile to wasm yet — `plum-wasm-codegen` reports a clear error rather than silently producing wrong code:
348
348
 
349
349
  - interpolating a `Float` value in a string (`Str`/`Int`/`Bool` interpolation, and plain non-interpolated literals, all compile) — correct decimal formatting of a float is a substantial separate undertaking (something like Grisu/Ryu), scoped out for now
350
- - `libs/std`'s actual `List`/`Map` still don't fully compile — cross-file `import` resolution now works (`import <path>` resolves against `--lib-path`, defaulting to `./libs`), and variadic parameters work, but `List`'s methods beyond `get`/`length` (`add`, `set`, `removeAt`, `remove`, `clear`, `reverse`) are still `todo`; separately, `List`'s own `join` method (and `Map`) reference a `Buffer` type and trait-bounded dispatch (`Stringable`) that don't exist yet — `plum-checker` doesn't process trait declarations at all currently
350
+ - `libs/std`'s actual `List`/`Map` still don't compile — `List`'s methods (`get`/`length`/`add`/`set`/`removeAt`/`remove`/`clear`/`reverse`/`each`/`map`) are all implemented now, but a class or enum-variant field declared with a concrete instantiation of another generic type (`Node.next: Option[Node]`, needed by `List`/`Node`'s own linked-list shape) doesn't survive monomorphization — `plumTypeFromAst` drops generic type arguments when building field types, so once the referenced generic type is specialized (and its unspecialized original removed), the field is left pointing at a name that no longer exists. This is a `plum-checker` generics gap, not a codegen one — the underlying wasm-gc struct/array machinery it would need is fully implemented and tested (see `plum-wasm-codegen/tests/codegen_tests.rs`'s `listAddSetRemoveAtRemoveClearReverseAllWorkCorrectly` and `removingEveryNodeInALoopLeavesAnEmptyCorrectlyFunctioningList`, which port `List`'s methods onto an equivalent non-generic shape to prove it). Separately, `List`'s own `join` method (and `Map`) reference a `Buffer` type and trait-bounded dispatch (`Stringable`) that don't exist yet — `plum-checker` doesn't process trait declarations at all currently
docs/superpowers/plans/2026-07-25-wasm-gc-migration.md CHANGED
@@ -227,11 +227,11 @@ git commit -m "feat(libs/std): implement List's add/set/removeAt/remove/clear/re
227
227
 
228
228
  **Files:** `README.md` (Known Gaps section)
229
229
 
230
- - [ ] **Step 1: `cargo build --workspace --all-targets` and `cargo test --workspace`.** Expected: 100% pass.
231
- - [ ] **Step 2: `cd tooling/tree-sitter-plum && npx --yes tree-sitter-cli test`** — unaffected by this plan (no grammar changes), confirm it's still 100% as a sanity check that nothing unrelated regressed.
232
- - [ ] **Step 3: Run `scripts/test-examples.sh`** (added in an earlier session) to confirm every `examples/*.plum` file still compiles and runs correctly through the real CLI end to end, not just the unit test suite.
233
- - [ ] **Step 4: Update README's "Known gaps" section** — the current entry "`libs/std`'s actual `List`/`Map` still don't fully compile ... `List`'s methods beyond `get`/`length` ... are still `todo`" is resolved by Task 3; remove or rewrite that bullet to reflect reality. Check whether `Map`'s own gap (references `Buffer`/`Stringable` trait-bounded dispatch, which `plum-checker` still doesn't process) is still accurate and leave that part as-is if so — don't overclaim `Map` fully works if trait dispatch still doesn't exist.
234
- - [ ] **Step 5: Commit**
230
+ - [x] **Step 1: `cargo build --workspace --all-targets` and `cargo test --workspace`.** Expected: 100% pass.
231
+ - [x] **Step 2: `cd tooling/tree-sitter-plum && npx --yes tree-sitter-cli test`** — unaffected by this plan (no grammar changes), confirm it's still 100% as a sanity check that nothing unrelated regressed.
232
+ - [x] **Step 3: Run `scripts/test-examples.sh`** (added in an earlier session) to confirm every `examples/*.plum` file still compiles and runs correctly through the real CLI end to end, not just the unit test suite.
233
+ - [x] **Step 4: Update README's "Known gaps" section** — the current entry "`libs/std`'s actual `List`/`Map` still don't fully compile ... `List`'s methods beyond `get`/`length` ... are still `todo`" is resolved by Task 3; remove or rewrite that bullet to reflect reality. Check whether `Map`'s own gap (references `Buffer`/`Stringable` trait-bounded dispatch, which `plum-checker` still doesn't process) is still accurate and leave that part as-is if so — don't overclaim `Map` fully works if trait dispatch still doesn't exist.
234
+ - [x] **Step 5: Commit**
235
235
 
236
236
  ```bash
237
237
  git add README.md