-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compute hashes correctly when constructing internalised collections (#…
…568) This PR fixes a bug in the computation of the synthesis bottom-up hash attribute of `Term`s representing internalised maps and sets. These hashes are used in the `Eq` instance for `Term` to quilcky check if two terms are equal, akin to a Merkle tree. Summary of changes: - the commits 348f852, 17005f2 and df6a063 comprise the main fix, i.e. correct how the `KMap` and `KSet` pattern-synonyms compute the hashes; - b7aac44 makes sure we `foldl'` rather than `foldr` in some of the cases, as we should use the left fold for data as rule of thumb for better performance. I did not check the impact of this commit specifically though; - there are some more stylistic changes and unit tests for the first change.
- Loading branch information
Showing
3 changed files
with
207 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.