Fix staged effect scope and prototype open rows - #240
Draft
MelbourneDeveloper wants to merge 12 commits into
Draft
MelbourneDeveloper wants to merge 12 commits into
MelbourneDeveloper wants to merge 12 commits into
Conversation
MelbourneDeveloper
marked this pull request as draft
September 23, 2026 11:50
Validate source effects before discharge, preserve generic operation identities and callback provenance, reject unresolved kernel callbacks, and keep inferred stateful handler factories monomorphic across branches. Add native/default/ML regression coverage and align stale effect guidance.
Preserve open row tails through parsing, signatures, formatting and docs, then allow higher-order callback requirements to flow through closed-program checks. Exercise native handlers and compare the same example with Koka's quantified row. Stabilize the installed VSIX code-action test against transient VS Code cancellation. Keep full row polymorphism explicitly open in plan 0016.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and result
Partial runtime handlers could hide outer static arms, generic effect instantiations could lose identity during discharge, and returned handler factories could reach codegen with incompatible erased callback types. This PR preserves operation scope and concrete callable types through validation, lowering and codegen. A written
![]rejects operations, runtime builtins and unproven callbacks in both flavors and module signatures.The branch parses and checks a closed-program prototype of
!eand![Log | e]; formatting, generated docs and editor signatures preserve the written row. Runnable Osprey/Koka examples substitute two implementations for the same work. A staged example runs one open-row helper with a static or dynamic handler in both flavors. Static-only lowering has no effect-dispatch symbol; native, wasm32 and iOS corpus goldens pin its output. The installed VSIX test retries transient VS Code code-action cancellation only when the document version is unchanged.Validation
775cc99c: native corpus 217/217 under default, GC and ARC (zero ARC leaks); wasm32 corpus 151/151 with 66 pinned capability skips; iOS simulator corpus 136/136 with 81 pinned capability skips. Both new flavor cases print41on all three targets. API docs now show the declared row once with source-local names. The full local workspace suite passed on the preceding head; all 16 focused docs tests, the exact HTML integration check, formatting and strict workspace Clippy pass on this head. Hosted CI is restarting for this repair.make cistops at the repository's Deslop gate because its executable is unavailable on this machine; hosted CI runs the pinned action.This PR remains draft. The open-row support is a closed-program prototype, not full row polymorphism: function types still lack independently quantified latent rows and scoped row unification. Plan 0016 still requires named instances and masking, owned/multi-shot continuations, deterministic finalization, wasm control-handler parity and inferred-effect tooling. The related structured-concurrency and arithmetic-effects plans also remain unimplemented. Green CI alone does not establish those contracts.