Add map method to OneAnd. Fix for #885#886
Conversation
OneAnd was missing an instance of map. This commit tries to solve this.
|
👍 - could you also replace the existing |
|
will do :) |
Current coverage is
|
…h the new map CoMonad required a explicit Functor[List], there may be a better alternative
|
Done! I'm not sure about the |
|
You probably added it because the type checker couldn't find a |
Import at trait level due to conflict with Semigroup definitions
| } | ||
|
|
||
| trait OneAndLowPriority0 { | ||
| import cats.std.list._ |
There was a problem hiding this comment.
Nitpicking: would prefer this to be moved to the top
|
One minor comment, but 👍 on Travis green |
|
Hm seems moving it to the top does funky things - anyone know why this is the case? Either way, 👍 from me |
Thanks @julien-truffaut for his help fixing this compilation error!
|
Fixed compilation issue when moving import to top, thanks to @julien-truffaut for his support (he was the one fixing it in fact, I'm just stealing the contribution :P) |
|
|
||
| implicit def oneAndSemigroup[F[_]: MonadCombine, A]: Semigroup[OneAnd[F, A]] = | ||
| oneAndSemigroupK.algebra | ||
| oneAndSemigroupK(MonadCombine[F]).algebra |
There was a problem hiding this comment.
Sorry, this is nitpicky, but could you please change this to oneAndSemigroupK[F].algebra? That will save a MonadCombine.apply call.
There was a problem hiding this comment.
for some reason the compiler get confused with oneAndSemigroupK[F] after adding import cats.std.list._ on the top of the file. It says that there is an ambiguity between MonadCombine[List] and MonadCombine[F] ...
There was a problem hiding this comment.
sorry I misread your comment @ceedubs, you were right oneAndSemigroupK[F] is enough to disambiguate.
|
👍 when the build is green |
Add map method to OneAnd. Fix for #885
OneAnd was missing an instance of map. This commit tries to solve this.