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

Correctly extract inner ghost functions. #241

Merged
merged 1 commit into from
Oct 16, 2024
Merged

Conversation

gebner
Copy link
Contributor

@gebner gebner commented Oct 16, 2024

Inner ghost functions used to be extracted as Obj.magic (fun _ -> ()) (that's the definition, not the call site). Changing the let to have a pure effect allows extraction to remove the definition and the associated magic (which in turn breaks pulse2rust).

More generally, I'm not sure if we need to put a DIV-effect on let-bindings with a C_Tot effect at all.

@gebner
Copy link
Contributor Author

gebner commented Oct 16, 2024

This is a repeat of #182. Guido added a test case there, but that test didn't catch this. The slices code used to break pulse2rust and serves as another test.

@gebner gebner merged commit eea0fae into main Oct 16, 2024
2 checks passed
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