8000 WIP: allow AsyncShift in kyo-direct by ahoy-jon · Pull Request #1197 · getkyo/kyo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

WIP: allow AsyncShift in kyo-direct #1197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

ahoy-jon
Copy link

Problem

Kyo doesn't allow AsyncShift

defer:
  xs.map(_.now) //Kyo.traverse(xs)(_.now)

and could be a nice to have, similar to direct-style

context:
  xs.map(_.?)

Solution

Allow some Async Shifts during validation, like Seq.map, ...

Resources

@ahoy-jon ahoy-jon marked this pull request as draft May 19, 2025 20:03
@ahoy-jon
Copy link
Author

So, it works. I'm not a big fan of the current approach, which involves starting from the root tree, walking up to find the parent, and manually checking the type and method name.

I reviewed the code in dotty-async-cps and did not find any built-in support for this.

The plan is to go with a brute-force strategy:

  • List the main combinations of types and method names (like Seq.map, Option.map, etc.)
  • Build a custom Trees.traverse to handle everything in a single pass and avoid repeated tree walks.

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
0