-
-
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
Add more syntax #1398
Add more syntax #1398
Conversation
Same here @adelbertc | @non, labelling this as hackathon would be cool! |
Compiling took long time at the conference and drained my apple battery. Therefore I committed some stuff so Travis could do the heavy lifting. Compiled/tested it locally now, it should work and in my opinion a squash merge is fine :-) |
Current coverage is 91.74% (diff: 100%)@@ master #1398 diff @@
==========================================
Files 240 240
Lines 3610 3608 -2
Methods 3546 3537 -9
Messages 0 0
Branches 63 70 +7
==========================================
Hits 3310 3310
+ Misses 300 298 -2
Partials 0 0
|
@@ -7,8 +7,11 @@ import simulacrum.typeclass | |||
* Must obey the laws defined in cats.laws.ComposeLaws. | |||
*/ | |||
@typeclass trait Compose[F[_, _]] { self => | |||
|
|||
@simulacrum.op(":<<", alias = true) |
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 don't like the asymmetry here. If we have the :<<
The other should be >>:
.
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 also dislike it, but I am getting this compile error when introducing >>:
, guess it's right associative, even when you put the :
on the right.
[error] /Users/mark/Projects/cats/tests/src/test/scala/cats/tests/SyntaxTests.scala:55: type mismatch;
[error] found : x$1.type (with underlying type F[B,C])
[error] required: F[D,?]
[error] val a = x >>: y >>: z
[error]
Why doesn't
|
@johnynek It works! I thought it wouldn't due operator associativity. Good to squash merge now I think :-) |
👍 |
1 similar comment
👍 |
@non As we talked about at Lamba.world :-)
Monoid.combineAll
which I would like syntax for, is the same thing asFoldable.fold
orFoldable.combineAll
which already comes in fromFoldable.Ops
right?