-
-
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
rename Cartesian to Semigroupal #1961
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1961 +/- ##
=======================================
Coverage 96.07% 96.07%
=======================================
Files 273 273
Lines 4538 4538
Branches 119 122 +3
=======================================
Hits 4360 4360
Misses 178 178
Continue to review full report at Codecov.
|
"invariant cartesian associativity" -> forAll((fa: F[A], fb: F[B], fc: F[C]) => laws.invariantMonoidalAssociativity(fa, fb, fc)) | ||
"invariant semigroupal left identity" -> forAll((fa: F[A], b: B) => laws.invariantMonoidalLeftIdentity(fa, b)), | ||
"invariant semigroupal right identity" -> forAll((fa: F[A], b: B) => laws.invariantMonoidalRightIdentity(fa, b)), | ||
"invariant semigroupal associativity" -> forAll((fa: F[A], fb: F[B], fc: F[C]) => laws.invariantMonoidalAssociativity(fa, fb, fc)) |
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.
"Invariant monoidal left identity"?
## To test scala fix | ||
|
||
```bash | ||
sbt ;coreJVM/publishLocal;coreFree/publishLocal |
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 redundant with the other scalafix PR?
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.
Are you referring the PR that add this to travis? This is to add it to readme so people know how to run the test locally.
object RenameCartesianTests { | ||
import cats.syntax.semigroupal._ | ||
|
||
def prod[F[_]: Semigroupal, A, B](fa: F[A], fb: F[B]): F[(A, B)] = Semigroupal[F].product(fa, fb) |
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.
❤️
} | ||
|
||
// ref: https://github.com/typelevel/cats/pull/1961 |
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.
👍
@@ -90,4 +90,7 @@ package object cats { | |||
val Semigroup = cats.kernel.Semigroup | |||
val Monoid = cats.kernel.Monoid | |||
val Group = cats.kernel.Group | |||
|
|||
@deprecated("renamed to Semigroupal", "1.0.0-RC1") | |||
type Cartesian[F[_]] = Semigroupal[F] |
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 think you've got some extra white space here
I'm going to go ahead and merge this. It got 2 sign-offs (1 of which dismissed by minor changes ) |
fixes #1931 with a deprecated type alias and scalafix
There are two commits in this PR the de6345e is the mechanical rename one - not much to look here.
the f42419b adds a scalafix rule that should be easy to review separately