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

Simplify ⫽ within projection #1283

Merged
merged 2 commits into from
Sep 12, 2019
Merged

Conversation

sjakobi
Copy link
Collaborator

@sjakobi sjakobi commented Sep 6, 2019

… as standardized in dhall-lang/dhall-lang#697.

This does not update the submodule as #1275 has to be sorted out first.

ksSet = Dhall.Set.toSet ks
kvs' = Dhall.Map.restrictKeys kvs ksSet
ks' = Dhall.Set.fromSet (Data.Set.difference ksSet (Dhall.Map.keysSet kvs'))
in vPrefer env (vProjectByFields env l ks') (VRecordLit kvs')
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I suspect that this could be refactored to be tail-recursive, but I don't expect that to change a lot performance-wise.

@sjakobi
Copy link
Collaborator Author

sjakobi commented Sep 6, 2019

Should I hold off on merging this until a release supporting Dhall-10 has been cut? The standard change was merged after the 10.0.0 release.

@Gabriella439
Copy link
Collaborator

@sjakobi: Yeah, hold off until I cut the 10.0.0 release. I will have a 10.0.0 pull request out tonight

@mergify mergify bot merged commit 796680b into master Sep 12, 2019
@mergify mergify bot deleted the sjakobi/prefer-within-projection branch September 12, 2019 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants