-
Notifications
You must be signed in to change notification settings - Fork 100
Add invariant checking #444
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
Conversation
I've checked that this tooling could have caught #420. Sample output:
|
Hmm, is there another bug in the new intersection implementation?! oO |
Probably not. I'm getting the same errors with the naive old |
a23fed8
to
214711c
Compare
ebb0cc2
to
b03df23
Compare
This should be ready for review. I'll hold off on adding more validity tests until I've refactored the existing property tests a bit. |
hashMatchesSubHashPath (SubHashPath ph l) h = maskToLength h l == ph | ||
where | ||
-- Note: This needs to use `shiftL` instead of `unsafeShiftL` because | ||
-- @l'@ may be greater than 32/64 at the deepest level. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greater than, or just equal to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
l
is 65 when the deepest leaves are checked on a 64-bit computer.
Huzzah! |
Addresses #366.
TODO:
D.HM.I.Debug
?!