Add support for accessing/projecting record type fields#2555
Open
Gabriella439 wants to merge 1 commit intomainfrom
Open
Add support for accessing/projecting record type fields#2555Gabriella439 wants to merge 1 commit intomainfrom
Gabriella439 wants to merge 1 commit intomainfrom
Conversation
… as standardized in dhall-lang/dhall-lang#1371
00b18b8 to
a3ffd19
Compare
Collaborator
|
What are the conflicts in the git submodule |
Collaborator
|
This PR fails with the corner case that I was describing in the discussion here: ⊢ { a : Bool, b : Text }.{}
{=}
⊢ { }.{}
{=}If an empty field selection is applied to a literal record type, the result must be |
winitzki
reviewed
Jun 23, 2025
| @@ -414,6 +417,9 @@ vProjectByFields env t ks = | |||
| VRecordLit kvs -> | |||
Collaborator
There was a problem hiding this comment.
Replace:
if null ks
then VRecordLit mempty
else case t ofby
case t of
VRecord _ | null ks -> VRecord mempty
_ | null ks -> VRecordLit memptyIn this way, { a : Bool } . { } will be correctly reduced to { }.
Collaborator
|
If this branch is too stale, I could prepare another branch with just the code changes (and no changes in the |
This was referenced Jun 23, 2025
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.
No description provided.