Extend Functor implementation in the Traverse instance of EitherT, OptionT and Tuple2K#2191
Conversation
traverse for monad transformer
|
this breaks binary compatibility. unfortunately these traits were not sealed. We might need to extend the functor trait at the instance creation site, rather than the traits. |
|
Thanks for the pointer, I was trying funny things. I will keep trying that way and see if I can make it keep the binary compatibility. Otherwise I will close it. |
Codecov Report
@@ Coverage Diff @@
## master #2191 +/- ##
==========================================
+ Coverage 94.73% 94.95% +0.22%
==========================================
Files 330 333 +3
Lines 5582 5787 +205
Branches 209 222 +13
==========================================
+ Hits 5288 5495 +207
+ Misses 294 292 -2
Continue to review full report at Codecov.
|
|
Thanks for the follow up. I think we can do something similar (if you are interested) for :
I might have missed some other opportunities. |
|
Sure, I'm happy to cover as much as I can. I will give a look. Thanks for the great support |
|
|
||
| override def contramap[A, B](fa: WriterT[F, L, A])(f: B => A): WriterT[F, L, B] = | ||
| WriterT(F0.contramap(fa.run)((d: (L, B)) => (d._1, f(d._2)))) | ||
| super[WriterTContravariant].contramap(fa)(f) |
There was a problem hiding this comment.
I couldn't find a way to remove this. If I do it I get this
[error] * in current version, classes mixing cats.data.WriterTContravariantMonoidal needs to update body of method contramap(cats.data.WriterT,scala.Function1)cats.data.WriterT
[error] filter with: ProblemFilters.exclude[UpdateForwarderBodyProblem]("cats.data.WriterTContravariantMonoidal.contramap")
from Mima. @kailuowang , @peterneyens can you think to anything I can try ? Thanks a lot
|
There is still a problem with |
|
I'm not sure what happened with this build, it looks like it was killed. Do I have any way to restart the CI ? Thanks |
|
Could the CI be reran ? Thanks |
|
This has been quiet for a while. I think I changed any case I could find. It should be ready for a review. Many thanks. |
|
Sorry for not reviewing sooner, this looks good to me, apart from the one snippet in |
|
No problem at all 😄 , thank you. I will see if I can do something then. |
|
Thanks so much! sorry about the delay. |
|
No worries. Thank you all 👍 |
This is about using the Functor instance in Traverse for the monad transformers
EitherTandOptionTand inTuple2Kso to use itsmapimplementation. This follows @peterneyens 's comment #2182 (comment) related toWriterT.