-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add cats Eq/Order for Quantity #95
Conversation
Signed-off-by: Carlos Quiroz <carlos.m.quiroz@gmail.com> Adds coulomb-cats Signed-off-by: Carlos Quiroz <carlos.m.quiroz@gmail.com>
Signed-off-by: Carlos Quiroz <carlos.m.quiroz@gmail.com>
This looks good. One last nit is that the file name |
Oh, can you add a file |
Just now that I'm writing the documentation I realize that |
I think there are potential use cases. I wanted "unit aware" comparisons but something like sorting an array is likely to be a case of comparing a collection of quantities having all the same value and unit types. |
Changed package name, added documentation and more tests Signed-off-by: Carlos Quiroz <carlos.m.quiroz@gmail.com>
I added a readme and a few more test cases. |
That is a very interesting point. I have to assume this comes up for all of my integrations, as I have In the immediate situation, what I propose is that we stick with In the longer term (a future coulomb-0.6 ?), this makes me want to re-think the package paths I am declaring, which would of course break some backward compatibility, but maybe some convention like |
Ok it makes sense. It is a problem mostly if you try to import something from cats after coulomb |
I'll update it |
Signed-off-by: Carlos Quiroz <carlos.m.quiroz@gmail.com>
Signed-off-by: Carlos Quiroz <carlos.m.quiroz@gmail.com>
I moved the package back as suggested |
Signed-off-by: Carlos Quiroz <carlos.m.quiroz@gmail.com>
LGTM, Thanks @cquiroz! |
* Add cats Eq/Order for Quantity Signed-off-by: Carlos Quiroz <carlos.m.quiroz@gmail.com> Adds coulomb-cats Signed-off-by: Carlos Quiroz <carlos.m.quiroz@gmail.com> * Updated according to PR comments Signed-off-by: Carlos Quiroz <carlos.m.quiroz@gmail.com> * More suggested changes from PR Changed package name, added documentation and more tests Signed-off-by: Carlos Quiroz <carlos.m.quiroz@gmail.com> * Moved implicits package to coulomb.cats Signed-off-by: Carlos Quiroz <carlos.m.quiroz@gmail.com> * Fix reference to package name in the README Signed-off-by: Carlos Quiroz <carlos.m.quiroz@gmail.com> * Remove documentation typo Signed-off-by: Carlos Quiroz <carlos.m.quiroz@gmail.com>
This is a first attempt at a
coulomb-cats
module. It contains now just the definitions ofEq
andOrder
forQuantity[A, U]
. Hopefully it can be expanded to get usFunctor
but I had some troubles on my attemptsIt contains two modules:
coulomb-cats
contains the typeclasses andcoulomb-testkit
that containsArbitrary
andCogen
instances for test anddiscipline
tests. If you prefer I could move the tests tocoulomb-tests