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

Dhall.Core.Project should store an ordered set of field projections #664

Closed
ocharles opened this issue Oct 29, 2018 · 4 comments
Closed

Comments

@ocharles
Copy link
Member

Continuing from #518, which identifies that the Set currently used will loose field ordering.

@f-f
Copy link
Member

f-f commented Oct 29, 2018

@ocharles what’s the use case for this?

@ocharles
Copy link
Member Author

For dhall format to retain the filed ordering. It was mentioned in #516 that Project probably shouldn't just be using a Set.

@ocharles ocharles changed the title Dhall.Core.Project should store an ordered set of filed projections Dhall.Core.Project should store an ordered set of field projections Oct 30, 2018
@MonoidMusician
Copy link
Contributor

For what it’s worth, the way I’m modelling this in my dhall-purescript project is by using the same datatype used to represent records and unions, except over () instead of Expr ... (Expr is now parameterized over that functor too, so it can be ordered [(String, a)] or unordered Map String a, whatever.) I just think it conceptually works well to have the projection set represented in the same way as records themselves, and it seems to cost little.

@Gabriella439
Copy link
Collaborator

This was fixed by #670

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants