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

Sort record and union fields when CBOR-encoding #835

Merged
merged 4 commits into from
Mar 3, 2019

Conversation

f-f
Copy link
Member

@f-f f-f commented Feb 28, 2019

As standardized in dhall-lang/dhall-lang#392

@Gabriella439
Copy link
Collaborator

@f-f: It looks like there is a binary serialization roundtrip failure because serialization now sorts the fields

@f-f
Copy link
Member Author

f-f commented Mar 3, 2019

@Gabriel439 it's so lovely that QuickCheck can catch these things :)

The only way I could think of to fix this was to change the Arbitrary instance for Dhall.Map so that the fields are sorted.
With this fix the serialization roundtrips once again for the seed that failed on CI.
Do you have any other idea about it or is this ok?

@Gabriella439
Copy link
Collaborator

@f-f: Yeah, I think that's a perfectly fine solution

@f-f f-f merged commit 74e8003 into master Mar 3, 2019
@f-f f-f deleted the f-f/sort-fields-when-encoding branch March 3, 2019 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants