Skip to content

Fix staged effect scope and prototype open rows - #240

Draft
MelbourneDeveloper wants to merge 12 commits into
mainfrom
fixes
Draft

MelbourneDeveloper wants to merge 12 commits into
mainfrom
fixes

Conversation

@MelbourneDeveloper

@MelbourneDeveloper MelbourneDeveloper commented Sep 20, 2026 •

Copy link
Copy Markdown
Collaborator

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 !e and ![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

  • Current head 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 print 41 on 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.
  • The runnable handler, continuation, answer-transformation and open-row comparisons pass against real Koka, OCaml, Eff and Effekt where each supports the example.
  • Local make ci stops 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.

@MelbourneDeveloper
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.
@MelbourneDeveloper MelbourneDeveloper changed the title Shadow static handlers per operation, and debug Osprey tests from the Testing view Fix effect scope and provenance; add Test Explorer debugging Sep 23, 2026
@MelbourneDeveloper MelbourneDeveloper changed the title Fix effect scope and provenance; add Test Explorer debugging Fix staged effect scope and enforce empty row contracts Sep 23, 2026
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.
@MelbourneDeveloper MelbourneDeveloper changed the title Fix staged effect scope and enforce empty row contracts Fix staged effect scope and prototype open callback rows Sep 23, 2026
@MelbourneDeveloper MelbourneDeveloper changed the title Fix staged effect scope and prototype open callback rows Fix staged effect scope and prototype open rows Sep 23, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant