Skip to content

Chore: Collect magic constants #543

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

Merged
merged 6 commits into from
Mar 26, 2025
Merged

Chore: Collect magic constants #543

merged 6 commits into from
Mar 26, 2025

Conversation

jmid
Copy link
Collaborator

@jmid jmid commented Mar 26, 2025

Hacking on #540 I realized that the {Lin,STM}_{domain,thread,...} modes contain a number of hard-earned magic constants making these modes work reasonably well.

The constants are however

  • occurring directly in the code, rather than up front and
  • duplicated

The PR therefore pulls them out as documented top-level definitions.
In Lin, it is a bit more messy than in STM, as the constants are spread across both lin.ml and lin_domain.ml, ...
In lin_effect.ml I also decided to remove the useless Util.repeat 1.
None of these changes should be user-visible however.

@jmid
Copy link
Collaborator Author

jmid commented Mar 26, 2025

CI summary: all 36 workflows passed. Merging.

@jmid jmid merged commit 822ccf1 into main Mar 26, 2025
36 checks passed
@jmid
Copy link
Collaborator Author

jmid commented Mar 27, 2025

CI summary for merge to main

Out of 37 workflows 2 failed due to false alarms (from the same test even!)

@jmid jmid deleted the collect-magic-consts branch March 27, 2025 10:55
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