Commit Graph

11 Commits

Author SHA1 Message Date
21cb9cf51a spec: coroutine primitive — make-coroutine/resume/yield via perform/cek-step-loop
spec/coroutines.sx: define-library with make-coroutine, coroutine-resume,
coroutine-yield, coroutine?, coroutine-alive?. Built on existing perform/
cek-step-loop/cek-resume suspension machinery.

spec/tests/test-coroutines.sx: 17 tests — multi-yield, final return,
arg passthrough, alive? predicate, nested coroutines, recursive iteration,
independent coroutine interleaving.

Key: coroutine body must use (define loop (fn…)) not named let — named let
transpiles to cek_call→cek_run which rejects IO suspension. All 17/17 pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 16:15:48 +00:00
d84cf1882a plan: tick Phase 3 complete — dynamic-wind OCaml+JS done
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 15:18:07 +00:00
b126d4da76 plan: tick Phase 3 Spec+Tests, update progress log
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 14:19:52 +00:00
0577f245e2 plan: tick Phase 2 Verify+Commit, mark phase complete
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 12:53:40 +00:00
f5acb31c94 plan: tick Phase 2 JS bootstrapper checkbox, update progress log
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 12:46:32 +00:00
7888fbfd81 plan: tick Phase 2 Spec checkbox, update progress log
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 12:31:13 +00:00
e3e767e434 plan: tick Phase 2 OCaml + Tests checkboxes, update progress log
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 12:11:39 +00:00
8f0fc4ce52 primitives-loop: tick Phase 1 JS + Tests + Verify + Commit steps [x]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 10:02:49 +00:00
5a332fa430 spec: vector primitive — complete type signatures in spec/primitives.sx
All 10 vector primitives now have :as type annotations on every parameter,
:returns types, and :doc strings. make-vector gains optional fill annotation;
vector uses :rest for its variadic args; vector-ref/set! document bounds error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 19:33:39 +00:00
d1a00562a4 spec: vector primitives — bounds-checked ref/set!, vector-copy start/end slice
vector-ref and vector-set! now raise Eval_error on out-of-bounds index instead of
an OCaml array exception. vector-copy accepts optional start and end parameters for
slicing (R7RS §6.8). spec/primitives.sx doc updated to reflect slice params.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 19:27:54 +00:00
3759575b29 primitives-loop: Phase 0 done — stop language loops, verify E38/E39
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 19:02:12 +00:00