add name hint metadata to terms for pretty-printing#3201
Draft
danmatichuk wants to merge 1 commit intomasterfrom
Draft
add name hint metadata to terms for pretty-printing#3201danmatichuk wants to merge 1 commit intomasterfrom
danmatichuk wants to merge 1 commit intomasterfrom
Conversation
Contributor
Author
|
I've re-implemented this in order to make the term metadata a formal TermF constructor. This required some changes to a number of primitives, so that they both ignore the metadata wrappers, and preserve metadata wherever appropriate. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
partially addresses #3073
Attaches some provenance information to subterms that may be used when inventing variable names for memoization.
Currently this data exists as a field inTerm, which is a bit wonky because it violates the invariant that terms with the same index must be equal. However, for most purposes this doesn't matter, it (should) only be relevant for printing. The current downside is that term caching can cause some provided name hints to be ignored (instead using the name hints that were present when the cache entry was made).Update: see comment