Skip to content
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

5.3 effect syntax #552

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

5.3 effect syntax #552

wants to merge 3 commits into from

Conversation

hhugo
Copy link
Collaborator

@hhugo hhugo commented Jan 13, 2025

No description provided.

@NathanReb
Copy link
Collaborator

I like the idea, if that sounds good to you I'll make it more aligned with our other migration specific extensions and add tests to turn it into a full PR.

@hhugo
Copy link
Collaborator Author

hhugo commented Jan 13, 2025

I like the idea, if that sounds good to you I'll make it more aligned with our other migration specific extensions and add tests to turn it into a full PR.

Feel free to take it from there.

@NathanReb
Copy link
Collaborator

I added a test and tweaked a couple simple things.

I still have a couple concerns though before we can merge this:

  1. it won't work if someone's using the driver's source output as it just straight up prints the internal AST version without running the migration back to the compiler's version
  2. I wonder how it interacts with deriving_inline and other correction generating ppx-es. My feeling is that it should be fine as long as one doesn't try to directly get the deriver to embed code that uses the effect syntax but it will likely result in the corrected output containing the extension otherwise.

I'll test this a bit more. If it turns out I was right, I think we could add a flag to the driver to force it to migrate the AST and use the compiler's printer to prevent that from happening in the few places where it could cause troubles.

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