-
Notifications
You must be signed in to change notification settings - Fork 62
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
BoundingBox is now Monoidal #2
Conversation
Also, I think the implementation of |
One other thing that occurs to me -- I went to start writing some simple QC tests for this module, but realized that I can't because of things not being exported. Can we refactor this into a module (On second thought, perhaps this should wait until a separate patch.) |
In order to resolve the "mempty" constraint issues, I've introduced "emptyBox". Since the type of "intersections" is confusing and potentially error-prone (using the "Nothing" constructor to represent the box that includes everything), and "unions" is just "mconcat", I've removed them. I think the "intersect" definition should work, as it uses "fromPoints" to check for that. This is more efficient than doing a separate "outside" check. Why do the QC tests need to have access to the internals? |
I suppose one reason to access internals is to check the results - but shouldn't Eq be enough? For some things, approximate equality might be useful, but even then, we can use "getCorners" |
Oh! Sorry, I see what you mean now re: Re: access to internals for writing QC tests, the issue is that we need to be able to write an |
Thanks! Yeah, I'm glad about how the changes turned out overall. This Imho, fromCorners is trivially correct if its used to implement the other
|
No description provided.