plum

#treesitter#compiler#wasm

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

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


4bde697 — Peter John 2026-11-06T15:21:10+05:30
plans: simpler language file patterns
docs/plans/2026-11-06-simpler-language.md CHANGED
@@ -58,7 +58,7 @@ Ruling: chain - every task rewrites the same std and compiler passes, so paralle
58
58
  **Probe entry:** run=plum test std examples tests
59
59
 
60
60
  ### T1 baseline on master · Complexity 3 · Est. context 40k
61
- **Owns:** docs/plans/2026-11-06-simpler-language.benchmark.md, .superlite/baseline-master/**
61
+ **Owns:** docs/plans/2026-11-06-simpler-language.benchmark.md, .superlite/baseline-master/**/*
62
62
  **Components:** 1
63
63
  **LOC owned:** 100
64
64
  **Tests:** fast
@@ -68,7 +68,7 @@ e.g. `.superlite/baseline-master/target/release/plum test std` runs today's lang
68
68
  **Test code:** none; the numbers are the deliverable.
69
69
 
70
70
  ### T2 plain games, one scene · Complexity 6 · Est. context 80k
71
- **Owns:** std/game/**, examples/games/**, compiler/game/**, compiler/cli/**, compiler/driver/**, compiler/checker/src/**, compiler/checker/tests/**, compiler/core/src/**, compiler/core/tests/**, compiler/wasm-codegen/**, tests/**, docs/plans/2026-11-06-simpler-language.benchmark.md
71
+ **Owns:** std/game/**/*, examples/games/**/*, compiler/game/**/*, compiler/cli/**/*, compiler/driver/**/*, compiler/checker/src/**/*, compiler/checker/tests/**/*, compiler/core/src/**/*, compiler/core/tests/**/*, compiler/wasm-codegen/**/*, tests/**/*, docs/plans/2026-11-06-simpler-language.benchmark.md
72
72
  **Components:** 3
73
73
  **LOC owned:** 800
74
74
  **Tests:** fast
@@ -79,7 +79,7 @@ e.g. the `OrbRun` game in the review plan runs under `plum run`, with `import st
79
79
  **Test code:** the cli `run`/`build` tests use a plain game; a test for the missing-method error; web-test still passes on a ported game.
80
80
 
81
81
  ### T3 no inheritance · Complexity 7 · Est. context 90k
82
- **Owns:** compiler/core/src/**, compiler/core/tests/**, compiler/checker/**, compiler/wasm-codegen/**, compiler/lsp/**, compiler/tooling/**, compiler/game/**, std/**, examples/**, tests/**
82
+ **Owns:** compiler/core/src/**/*, compiler/core/tests/**/*, compiler/checker/**/*, compiler/wasm-codegen/**/*, compiler/lsp/**/*, compiler/tooling/**/*, compiler/game/**/*, std/**/*, examples/**/*, tests/**/*
83
83
  **Components:** 3
84
84
  **LOC owned:** 1500
85
85
  **Tests:** fast
@@ -92,7 +92,7 @@ e.g. `struct A(B(x))` gives a parse error, and `examples/subtyping.plum` is dele
92
92
  ## Package B: modules
93
93
 
94
94
  ### T4 modules · Complexity 8 · Est. context 110k
95
- **Owns:** compiler/core/src/**, compiler/core/tests/**, compiler/checker/**, compiler/wasm-codegen/**, compiler/driver/**, compiler/lsp/**, compiler/host/**, compiler/tooling/**, tests/modules/**
95
+ **Owns:** compiler/core/src/**/*, compiler/core/tests/**/*, compiler/checker/**/*, compiler/wasm-codegen/**/*, compiler/driver/**/*, compiler/lsp/**/*, compiler/host/**/*, compiler/tooling/**/*, tests/modules/**/*
96
96
  **Components:** 3
97
97
  **LOC owned:** 900
98
98
  **Tests:** fast
@@ -103,7 +103,7 @@ e.g. two imported modules each with `fun clamp` both work as `a.clamp(..)` and `
103
103
  **Test code:** `tests/modules/`: same function name in two modules; constants; shadowing by a local; import cycles keep their current error; `primitive` outside std rejected; `extern` without `io` first rejected.
104
104
 
105
105
  ### T5 std namespaces to modules · Complexity 7 · Est. context 110k
106
- **Owns:** std/**, examples/**, tests/**, compiler/core/src/**, compiler/core/tests/**, compiler/checker/**, compiler/wasm-codegen/**, compiler/game/**, compiler/cli/**, compiler/lsp/**
106
+ **Owns:** std/**/*, examples/**/*, tests/**/*, compiler/core/src/**/*, compiler/core/tests/**/*, compiler/checker/**/*, compiler/wasm-codegen/**/*, compiler/game/**/*, compiler/cli/**/*, compiler/lsp/**/*
107
107
  **Components:** 3
108
108
  **LOC owned:** 1500
109
109
  **Tests:** fast
@@ -116,7 +116,7 @@ e.g. `import std/math` then `math.sqrt(2.0)`; `Math.sqrt` is an error
116
116
  ## Package C: syntax
117
117
 
118
118
  ### T6 question rewrite and block if · Complexity 7 · Est. context 90k
119
- **Owns:** compiler/core/src/**, compiler/core/tests/**, compiler/checker/**, compiler/wasm-codegen/**, tests/syntax/**
119
+ **Owns:** compiler/core/src/**/*, compiler/core/tests/**/*, compiler/checker/**/*, compiler/wasm-codegen/**/*, tests/syntax/**/*
120
120
  **Components:** 2
121
121
  **LOC owned:** 500
122
122
  **Tests:** fast
@@ -127,7 +127,7 @@ e.g. `v := if a\n 1\nelse\n 2` compiles, and `--explain-fusion` reports a func
127
127
  **Test code:** `tests/syntax/question.plum`: chains; nested in arguments, with evaluation order observed; both enums; every rejected form; same answers with `--no-fusion`.
128
128
 
129
129
  ### T7 update operator and spread paths · Complexity 5 · Est. context 60k
130
- **Owns:** compiler/core/src/**, compiler/core/tests/**, compiler/checker/**, compiler/lsp/**, compiler/tooling/**, tests/syntax/**
130
+ **Owns:** compiler/core/src/**/*, compiler/core/tests/**/*, compiler/checker/**/*, compiler/lsp/**/*, compiler/tooling/**/*, tests/syntax/**/*
131
131
  **Components:** 2
132
132
  **LOC owned:** 300
133
133
  **Tests:** fast
@@ -138,7 +138,7 @@ e.g. `State(..s, ship.x: 1.0)` is `State(..s, ship: Ship(..s.ship, x: 1.0))`
138
138
  **Test code:** `tests/syntax/`: shared prefixes, deep paths, a receiver with a side effect runs once, non-`mut` target rejected, path through an enum rejected.
139
139
 
140
140
  ### T8 std off return and while · Complexity 8 · Est. context 130k
141
- **Owns:** std/**
141
+ **Owns:** std/**/*
142
142
  **Components:** 2
143
143
  **LOC owned:** 2000
144
144
  **Tests:** fast
@@ -149,7 +149,7 @@ e.g. `grep -rE '\breturn\b|^\s*while ' std` finds nothing in code
149
149
  **Test code:** existing std tests stay unchanged and pass.
150
150
 
151
151
  ### T9 examples and tests off return and while · Complexity 6 · Est. context 110k
152
- **Owns:** examples/**, tests/**, compiler/core/tests/**, compiler/checker/tests/**, compiler/wasm-codegen/tests/**, compiler/cli/tests/**, compiler/game/**
152
+ **Owns:** examples/**/*, tests/**/*, compiler/core/tests/**/*, compiler/checker/tests/**/*, compiler/wasm-codegen/tests/**/*, compiler/cli/tests/**/*, compiler/game/**/*
153
153
  **Components:** 2
154
154
  **LOC owned:** 1800
155
155
  **Tests:** fast
@@ -160,7 +160,7 @@ e.g. `examples/control_flow.plum` teaches `if`, `match`, `for`, `fold` and recur
160
160
  **Test code:** ported tests.
161
161
 
162
162
  ### T10 remove the old forms · Complexity 8 · Est. context 120k
163
- **Owns:** compiler/core/src/**, compiler/core/tests/**, compiler/checker/**, compiler/wasm-codegen/**, compiler/driver/**, compiler/lsp/**, compiler/tooling/**, std/Array.plum, tests/**
163
+ **Owns:** compiler/core/src/**/*, compiler/core/tests/**/*, compiler/checker/**/*, compiler/wasm-codegen/**/*, compiler/driver/**/*, compiler/lsp/**/*, compiler/tooling/**/*, std/Array.plum, tests/**/*
164
164
  **Components:** 3
165
165
  **LOC owned:** 2000
166
166
  **Tests:** fast
@@ -173,7 +173,7 @@ e.g. `x = 1` on a local reports "locals can't be reassigned; use a new name with
173
173
  ## Package D: the proof, for structs and enums
174
174
 
175
175
  ### T11 proof by type · Complexity 8 · Est. context 110k
176
- **Owns:** compiler/core/src/uniqueness.rs, compiler/core/src/purity.rs, compiler/core/src/reuse.rs, compiler/core/tests/**, compiler/driver/**, compiler/checker/src/**, tests/fbip/**
176
+ **Owns:** compiler/core/src/uniqueness.rs, compiler/core/src/purity.rs, compiler/core/src/reuse.rs, compiler/core/tests/**/*, compiler/driver/**/*, compiler/checker/src/**/*, tests/fbip/**/*
177
177
  **Components:** 2
178
178
  **LOC owned:** 800
179
179
  **Tests:** fast
@@ -184,7 +184,7 @@ e.g. a struct with a method named `push` no longer blocks another type's `push`
184
184
  **Test code:** every stage 1 aliasing test stays; new hostile programs for same-named methods on different types; the fuzzer, 200 seeds, compared with `--no-fbip`.
185
185
 
186
186
  ### T12 last-use moves · Complexity 7 · Est. context 90k
187
- **Owns:** compiler/core/src/uniqueness.rs, compiler/core/tests/**, tests/fbip/**
187
+ **Owns:** compiler/core/src/uniqueness.rs, compiler/core/tests/**/*, tests/fbip/**/*
188
188
  **Components:** 1
189
189
  **LOC owned:** 400
190
190
  **Tests:** fast
@@ -195,7 +195,7 @@ e.g. `--explain-fusion` shows `S(..s, ship: s.ship.update(dt))` in place
195
195
  **Test code:** hostile programs: read after the move in one branch; move in a nested spread; capture before the move; the same value moved into two fields.
196
196
 
197
197
  ### T13 shared and unique callers · Complexity 7 · Est. context 90k
198
- **Owns:** compiler/core/src/uniqueness.rs, compiler/core/src/ctors.rs, compiler/core/tests/**, compiler/driver/**, tests/fbip/**
198
+ **Owns:** compiler/core/src/uniqueness.rs, compiler/core/src/ctors.rs, compiler/core/tests/**/*, compiler/driver/**/*, tests/fbip/**/*
199
199
  **Components:** 1
200
200
  **LOC owned:** 400
201
201
  **Tests:** fast
@@ -208,7 +208,7 @@ e.g. `--explain-fusion` names `update$unique` and `update` for such a function
208
208
  ## Package E: the comparison and docs
209
209
 
210
210
  ### T14 functional port and comparison · Complexity 6 · Est. context 80k
211
- **Owns:** compiler/game/web-test/fixtures/**, docs/plans/2026-11-06-simpler-language.benchmark.md, docs/imperative-vs-functional.md
211
+ **Owns:** compiler/game/web-test/fixtures/**/*, docs/plans/2026-11-06-simpler-language.benchmark.md, docs/imperative-vs-functional.md
212
212
  **Components:** 2
213
213
  **LOC owned:** 500
214
214
  **Tests:** fast