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 the fields of record projection during normalization #1111

Merged
merged 1 commit into from
Jul 15, 2019

Conversation

sjakobi
Copy link
Collaborator

@sjakobi sjakobi commented Jul 14, 2019

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

@@ -66,3 +67,6 @@ empty = Set Data.Set.empty Data.Sequence.empty
difference :: Ord a => Set a -> Set a -> [a]
difference os (Set s _) =
filter (\ x -> not (Data.Set.member x s)) (toList os)

sort :: Ord a => Set a -> Set a
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you add a haddock comment since it's part of the public API?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!

@sjakobi sjakobi force-pushed the sjakobi/sort-projection-fields branch from a29fce8 to 87425c6 Compare July 15, 2019 17:33
@sjakobi
Copy link
Collaborator Author

sjakobi commented Jul 15, 2019

I also tried to fix isNormalized.

Did you ever take a stab at the property tests you mention in #522 (comment), @Gabriel439?

@Gabriella439
Copy link
Collaborator

@sjakobi: I did, but they were disabled as part of the work on Dhall.Eval:

https://github.com/dhall-lang/dhall-haskell/blob/master/dhall/tests/Dhall/Test/QuickCheck.hs#L351-L354

Also: #876 (comment)

@sjakobi
Copy link
Collaborator Author

sjakobi commented Jul 15, 2019

@Gabriel439 Thanks for the pointers! I'll try to bring these tests back.

@sjakobi sjakobi merged commit 3856612 into master Jul 15, 2019
@sjakobi sjakobi deleted the sjakobi/sort-projection-fields branch July 15, 2019 18:55
@Gabriella439
Copy link
Collaborator

@sjakobi: You're welcome! 🙂

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.

None yet

2 participants