Skip to content

Separate async and generator body results from callable wrappers - #599

Merged
LPTK merged 10 commits into
hkust-taco:hkmc2from
LPTK:codex/pr575-async-generator-results
Oct 30, 2026
Merged

LPTK merged 10 commits into
hkust-taco:hkmc2from
LPTK:codex/pr575-async-generator-results

Conversation

@LPTK

@LPTK LPTK commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

[GPT-6 Astra]

Expose Promise and Iterator in callable signatures while preserving the declared body payload for explicit and implicit returns. Keep completed payload metadata in the defining compilation unit and rename it when cloning source bodies. Generator resolution carries its pending wrapper through curried and generic callable interfaces.

Cover typed Promise call boundaries, generator overrides and currying, nominal methods, cloned nominal payloads, and imported patterns. Preserve legacy resolution and leave shape-based symbol inference for the remaining PR.

Validation: Metals compilation; ctest and cwtest; focused async, generator, and cloning suites; hkmc2AllTests/test (1,158 tests). Reviewed the complete diff and regenerated golden output.

codex and others added 4 commits October 30, 2026 14:15
Expose Promise and Iterator in callable signatures while preserving the declared body payload for explicit and implicit returns. Keep completed payload metadata in the defining compilation unit and rename it when cloning source bodies. Generator resolution carries its pending wrapper through curried and generic callable interfaces.

Cover typed Promise call boundaries, generator overrides and currying, nominal methods, cloned nominal payloads, and imported patterns. Preserve legacy resolution and leave shape-based symbol inference for the remaining PR.

Validation: Metals compilation; ctest and cwtest; focused async, generator, and cloning suites; hkmc2AllTests/test (1,158 tests). Reviewed the complete diff and regenerated golden output.
@LPTK

LPTK commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Glad that we've split #575 up into many smaller chunks, as this has already allowed me to detect a few very smelly designs, which are being fixed (here and in follow-up PRs).

@LPTK
LPTK merged commit ca9b82d into hkust-taco:hkmc2 Oct 30, 2026
1 check passed
@LPTK
LPTK deleted the codex/pr575-async-generator-results branch October 30, 2026 10:35
LPTK pushed a commit to LPTK/mlscript that referenced this pull request Oct 30, 2026
Integrate hkust-taco#599 and hkust-taco#600 while preserving inferred erasure and
representation-changing deforestation. Reconcile shared function signatures
with retyped and refreshed bindings, retain inferred wrapper regressions,
and adapt the cast-comment fixtures to inference and cast elimination.

Update the extraction plan and include regenerated golden outputs.

Validation: Metals hkmc2JVM compilation and hkmc2AllTests/test (1,172 tests).
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.

2 participants