-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
updated to latest algebra #994
Conversation
This PR looks fine to me. 👍 if we can get Travis to pass (not sure why it failed) |
@non looks like that https://codecov.io/bash is down, causing the second part of the following command to fail
update: turns out codecov is taking a maintenance break. http://status.codecov.io/ |
OK, great. We can just hang out and wait for that to finish. Thanks for investigating! |
Looks like codecov is back online. Can we restart the build? |
Yeah let's try it again. |
Looks like that this time it failed on (or after) uploading coverage report to S3. Maybe codecov is still having issues. |
def eqv(x: (A, B), y: (A, B)): Boolean = | ||
A.eqv(x._1, y._1) && B.eqv(x._2, y._2) | ||
} | ||
implicit def tuple2Eq[A, B](implicit A: Eq[A], B: Eq[B]): Eq[(A, B)] = tuple.tuple2Eq |
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.
We should be able to just remove these right? And do the correct import at the places that use this?
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.
I admit I was too lazy. Just updated.
Can you also add extend the appropriate tuple instances trait like we do /~https://github.com/typelevel/cats/blob/master/core/src/main/scala/cats/std/anyval.scala#L18 so users only need 1 import? |
654257a
to
18b3912
Compare
@adelbertc IRT your last comment about adding the algebra tuple to |
@kailuowang let's open that up -- we just released 0.4.0 and i think that is pretty important |
@non makes sense. I will send in a PR to algebra soon. |
The build issues should be fixed. I'm going to try to close and reopen this to see if it makes Travis CI happy. |
Don't merge yet, waiting on a new algebra release so we can address @adelbertc's last comment |
Do we have an issue with scala.js versions of algebra? https://travis-ci.org/typelevel/cats/jobs/125562475#L3310-L3313 |
18b3912
to
346e4c1
Compare
ffe0c64
to
8bbdd48
Compare
@ceedubs, that's due to the fact that I forgot to update the algebra.law version down in the build.sbt. just pushed in a fix. |
Looks good to me. 👍 |
@@ -5,6 +5,7 @@ import cats.laws.discipline.{CartesianTests, MonadStateTests, SerializableTests} | |||
import cats.data.{State, StateT} | |||
import cats.laws.discipline.eq._ | |||
import cats.laws.discipline.arbitrary._ | |||
import cats.std.tuple._ |
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.
Is this needed?
👍 from me, modulo 2 nitpicky comments |
// on an algebra release that includes /~https://github.com/non/algebra/pull/82 | ||
implicit def writerTIdEq[L, V](implicit E: Eq[(L, V)]): Eq[WriterT[Id, L, V]] = | ||
implicit def writerTIdEq[L: Eq, V: Eq]: Eq[WriterT[Id, L, V]] = { | ||
import algebra.std.tuple.tuple2Eq |
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.
Can we move this up top with the rest of the imports?
8bbdd48
to
a8da9e4
Compare
@adelbertc's comments addressed. |
a8da9e4
to
c18cdbb
Compare
@@ -60,23 +60,9 @@ l.foldMap(i => i.toString) | |||
``` | |||
|
|||
To use this | |||
with a function that produces a tuple, we can define a `Monoid` for a tuple | |||
with a function that produces a tuple, cats also provides a `Monoid` for a tuple |
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.
Is this potentially confusing since these actually come from Algebra and the following sentence goes into detail about the role Algebra plays here?
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.
I used cats here because it is available through cats.std
. and I didn't notice the sentence below. I will add the detail about the instance below as well.
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.
update: N.B. added below. Please help review the wording.
c18cdbb
to
36c5a33
Compare
Current coverage is 83.76%@@ master #994 diff @@
==========================================
Files 368 368
Lines 2367 2365 -2
Methods 2162 2157 -5
Messages 0 0
Branches 16 20 +4
==========================================
- Hits 1983 1981 -2
Misses 384 384
Partials 0 0
|
👍 - if @travisbrown is OK with the comment changes let's merge |
👍 the clarification about algebra tuple instances looks good to me. I'm going to go ahead and merge. @travisbrown if you have suggestions for further improvements it should be easy for us to make a doc update after merging this. |
Sorry for the delay, but yes, +1 from me. |
No description provided.