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

Make it easier to distill/pretty print values #496

Merged
merged 4 commits into from
Feb 9, 2023

Conversation

brendanzab
Copy link
Member

@brendanzab brendanzab commented Feb 9, 2023

In an attempt to address #488, this reduces some of the gymnasics we’ve needed to do whenever we want to pretty print something. We achieve this by cloning the name environment as opposed to taking it by mutable reference when constructing a distillation environment.

This means we can no longer reuse the existing allocation when temporarily pushing local names, but I think the savings we got from this was probably minor, and the increase in clarity is worth it.

This reduces the gymnasics we’ve needed to do whenever we want to pretty
print something by cloning the name environment as opposed to taking it
by mutable reference when constructing a distillation environment.

This means we can no longer reuse the existing allocation when
temporarily pushing local names, but I think the savings we got from
this was probably minor, and the increase in clarity is worth it.
Copy link
Contributor

@wezm wezm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

Breaks up the long, vertical method chain into some separate
definitions, and tweaks the field names in the related messages for
clarity.
Some of this was probably unlocked by the switch to a global string
interner.
@brendanzab brendanzab merged commit a2d6790 into yeslogic:main Feb 9, 2023
@brendanzab brendanzab deleted the distillation-cleanups branch February 9, 2023 10:32
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