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

[ fixup #2939 ] Make futures not interfere with optimisations #3292

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

buzden
Copy link
Contributor

@buzden buzden commented May 31, 2024

Description

Fix in #2939 accidentally broke one (actually, inconsistent) assumption about how the lazy values are managed. This may lead to a crash, you can see an example in the newly added test. Incidentally, this does not crash on chez (yet) because of undocumented coindicence of two runtime representations in the current particular implementation (dynamically-typed languages, omg), but this can change in the future at any time. Racket fails properly.

I changed the way the primitive prim__makeFuture is called: now it reuses the way the forcing is actually implemented instead of trying to assume particular implementation. We should be more stable on potential future changes of the way lazy values are treated after this PR.

Pinging @mjustus as the merger of #2939.

UPD: Oh, and I found that one racket test actually run on chez, I think that was a copy-paste error, so I changed it.

@gallais gallais merged commit a6c5cf5 into idris-lang:main Jun 3, 2024
22 checks passed
@buzden buzden deleted the fixup-force-and-future branch June 3, 2024 14:56
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