fix: letrec metadata#979
Merged
dhess merged 2 commits intobrprice/let-rename-offerfrom May 22, 2023
Merged
Conversation
dhess
approved these changes
May 11, 2023
9dcd903 to
e375e09
Compare
e3a8bbb to
7875e91
Compare
In a subsequent commit we will add a test that some actions are *not* offered, which will use this refactoring. Signed-off-by: Ben Price <ben@hackworthltd.com>
Consider (some sort of) a `let` in a checkable position, whose body is synthesisable, e.g. `(λx. let y = ... in xor x y) : Bool -> Bool`. Prior to this commit, our treatment of metadata between `let` and `letrec` was inconsistent: - they both treat the body `xor x y` the same: checking it against `Bool`, finding it is synthesises `Bool` and then giving it a `TCEmb` metadata. - a `let` node would then get the same metadata - a `letrec` node would only get `TCChkedAt` metadata This is visible to a consumer of our API: what actions we offer differ, see the added test. Signed-off-by: Ben Price <ben@hackworthltd.com>
7875e91 to
4009eeb
Compare
Merged
Contributor
Author
|
Due to some confusion around target branches and merging, this was accidentally merged into the the wrong branch brprice/let-rename-offer, which closed this PR. That target branch has been reset, and #1029 has been opened to merge the changes in this PR into main. |
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.
Consider (some sort of) a
letin a checkable position, whose body issynthesisable, e.g.
(λx. let y = ... in xor x y) : Bool -> Bool. Prior tothis commit, our treatment of metadata between
letandletrecwasinconsistent:
xor x ythe same: checking it againstBool, finding it is synthesisesBooland then giving it aTCEmbmetadata.
letnode would then get the same metadataletrecnode would only getTCChkedAtmetadataThis is visible to a consumer of our API: what actions we offer differ,
see the added test.