-
Notifications
You must be signed in to change notification settings - Fork 18
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
define definitions recomputed on every call #134
Comments
Yes, it's a problem. We can't get rid of the As a start, I've submitted #135, which fixes your problem, but breaks many tests, which I'm still working through. (If your demo works ok with #135 then feel free to use it.) |
Thanks! I just cut that part of the demo. I can do with out it. |
Adds two versions of define: - `define`, which does not perform \delta-reduction. - `define-for-export`, which eagerly performs \delta-reduction. The eager \delta-reduction is a necessary workaround for Racket module issues and syntax-properties, and thus, needed when exporting a definition.
Partially addressed, but the issue is we need lazy (by-need) \delta-reduction, I think. |
I think this is because we implement define with a variable transformer instead of actually expanding to a variable de-reference. It surprised me in my attempt at a staged programming example. This has to do with how we implement normalization; we'd need a way to delta reduce variables at compile-time.
Should print
But actually
and we see
run
executed on every call use ofone
.The text was updated successfully, but these errors were encountered: