language-rust icon indicating copy to clipboard operation
language-rust copied to clipboard

Fix the `Ord` instance for `Ident` + some other small fixes

Open yav opened this issue 2 years ago • 0 comments

Previously the instance was incorrect because it'd cause an infinite loop.

This version rearranges the fields of the records to ensure that the hash field is first, which makes it possible to derive Eq and Ord.

We also do a bunch of refactoring to use record notation instead of constructor pattern matching, to make it easier to do similar refactoring in the future.

Other fixes: updates to make tests work, updates to make things work with more recent Aeson and Prettyprinter

yav avatar May 09 '23 15:05 yav