Skip to content
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

use & instead of with #4673

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion alleycats-core/src/main/scala/alleycats/std/set.scala
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ trait SetInstances {
// If we accept Monad for Set, we can also have Alternative, as
// Alternative only requires MonoidK (already accepted by cats-core) and
// the Applicative that comes from Monad.
implicit val alleyCatsStdSetMonad: Monad[Set] with Alternative[Set] =
implicit val alleyCatsStdSetMonad: Monad[Set] & Alternative[Set] =
new Monad[Set] with Alternative[Set] {
def pure[A](a: A): Set[A] = Set(a)
override def map[A, B](fa: Set[A])(f: A => B): Set[B] = fa.map(f)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ private[cats] trait ScalaVersionSpecificParallelInstances {

private[cats] trait ScalaVersionSpecificInvariantInstances {
@deprecated("Use catsInstancesForLazyList", "3.0.0")
implicit def catsInstancesForStream: Monad[Stream] with Alternative[Stream] with CoflatMap[Stream] =
implicit def catsInstancesForStream: Monad[Stream] & Alternative[Stream] & CoflatMap[Stream] =
cats.instances.stream.catsStdInstancesForStream

implicit def catsInstancesForLazyList: Monad[LazyList] with Alternative[LazyList] with CoflatMap[LazyList] =
implicit def catsInstancesForLazyList: Monad[LazyList] & Alternative[LazyList] & CoflatMap[LazyList] =
cats.instances.lazyList.catsStdInstancesForLazyList

implicit def catsInstancesForArraySeq: Monad[ArraySeq] with Alternative[ArraySeq] with CoflatMap[ArraySeq] =
implicit def catsInstancesForArraySeq: Monad[ArraySeq] & Alternative[ArraySeq] & CoflatMap[ArraySeq] =
cats.instances.arraySeq.catsStdInstancesForArraySeq
}

Expand Down
9 changes: 4 additions & 5 deletions core/src/main/scala-2.13+/cats/data/NonEmptyLazyList.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ object NonEmptyLazyList extends NonEmptyLazyListInstances {
private[data] type Base
private[data] trait Tag extends Any
/* aliased in data package as NonEmptyLazyList */
type Type[+A] <: Base with Tag
type Type[+A] <: Base & Tag

private[data] def create[A](s: LazyList[A]): Type[A] =
s.asInstanceOf[Type[A]]
Expand Down Expand Up @@ -510,10 +510,9 @@ class NonEmptyLazyListOps[A](private val value: NonEmptyLazyList[A])

sealed abstract private[data] class NonEmptyLazyListInstances extends NonEmptyLazyListInstances1 {

implicit val catsDataInstancesForNonEmptyLazyList: Bimonad[NonEmptyLazyList]
with NonEmptyTraverse[NonEmptyLazyList]
with NonEmptyAlternative[NonEmptyLazyList]
with Align[NonEmptyLazyList] =
implicit val catsDataInstancesForNonEmptyLazyList: Bimonad[NonEmptyLazyList] & NonEmptyTraverse[
NonEmptyLazyList
] & NonEmptyAlternative[NonEmptyLazyList] & Align[NonEmptyLazyList] =
new AbstractNonEmptyInstances[LazyList, NonEmptyLazyList] with Align[NonEmptyLazyList] {

def extract[A](fa: NonEmptyLazyList[A]): A = fa.head
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala-2.13+/cats/data/ZipLazyList.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ object ZipLazyList {

def apply[A](value: LazyList[A]): ZipLazyList[A] = new ZipLazyList(value)

implicit val catsDataAlternativeForZipLazyList: Alternative[ZipLazyList] with CommutativeApplicative[ZipLazyList] =
implicit val catsDataAlternativeForZipLazyList: Alternative[ZipLazyList] & CommutativeApplicative[ZipLazyList] =
new Alternative[ZipLazyList] with CommutativeApplicative[ZipLazyList] {
def pure[A](x: A): ZipLazyList[A] = new ZipLazyList(LazyList.continually(x))

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala-2.13+/cats/data/ZipStream.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ object ZipStream {

def apply[A](value: Stream[A]): ZipStream[A] = new ZipStream(value)

implicit val catsDataAlternativeForZipStream: Alternative[ZipStream] with CommutativeApplicative[ZipStream] =
implicit val catsDataAlternativeForZipStream: Alternative[ZipStream] & CommutativeApplicative[ZipStream] =
new Alternative[ZipStream] with CommutativeApplicative[ZipStream] {
def pure[A](x: A): ZipStream[A] = new ZipStream(Stream.continually(x))

Expand Down
4 changes: 2 additions & 2 deletions core/src/main/scala-2.13+/cats/instances/arraySeq.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import scala.collection.mutable.Builder

trait ArraySeqInstances extends cats.kernel.instances.ArraySeqInstances {
implicit def catsStdInstancesForArraySeq
: Traverse[ArraySeq] with Monad[ArraySeq] with Alternative[ArraySeq] with CoflatMap[ArraySeq] with Align[ArraySeq] =
: Traverse[ArraySeq] & Monad[ArraySeq] & Alternative[ArraySeq] & CoflatMap[ArraySeq] & Align[ArraySeq] =
ArraySeqInstances.stdInstances

implicit def catsStdTraverseFilterForArraySeq: TraverseFilter[ArraySeq] =
Expand All @@ -41,7 +41,7 @@ trait ArraySeqInstances extends cats.kernel.instances.ArraySeqInstances {

private[cats] object ArraySeqInstances {
final private val stdInstances
: Traverse[ArraySeq] with Monad[ArraySeq] with Alternative[ArraySeq] with CoflatMap[ArraySeq] with Align[ArraySeq] =
: Traverse[ArraySeq] & Monad[ArraySeq] & Alternative[ArraySeq] & CoflatMap[ArraySeq] & Align[ArraySeq] =
new Traverse[ArraySeq]
with Monad[ArraySeq]
with Alternative[ArraySeq]
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala-2.13+/cats/instances/lazyList.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import scala.annotation.tailrec
trait LazyListInstances extends cats.kernel.instances.LazyListInstances {

implicit val catsStdInstancesForLazyList
: Traverse[LazyList] with Alternative[LazyList] with Monad[LazyList] with CoflatMap[LazyList] with Align[LazyList] =
: Traverse[LazyList] & Alternative[LazyList] & Monad[LazyList] & CoflatMap[LazyList] & Align[LazyList] =
new Traverse[LazyList]
with Alternative[LazyList]
with Monad[LazyList]
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala-2.13+/cats/instances/stream.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ trait StreamInstances extends cats.kernel.instances.StreamInstances {

@deprecated("Use cats.instances.lazyList", "2.0.0-RC2")
implicit val catsStdInstancesForStream
: Traverse[Stream] with Alternative[Stream] with Monad[Stream] with CoflatMap[Stream] with Align[Stream] =
: Traverse[Stream] & Alternative[Stream] & Monad[Stream] & CoflatMap[Stream] & Align[Stream] =
new Traverse[Stream] with Alternative[Stream] with Monad[Stream] with CoflatMap[Stream] with Align[Stream] {

def empty[A]: Stream[A] = Stream.Empty
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/Eval.scala
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ object Eval extends EvalInstances {

sealed abstract private[cats] class EvalInstances extends EvalInstances0 {

implicit val catsBimonadForEval: Bimonad[Eval] with CommutativeMonad[Eval] =
implicit val catsBimonadForEval: Bimonad[Eval] & CommutativeMonad[Eval] =
new Bimonad[Eval] with StackSafeMonad[Eval] with CommutativeMonad[Eval] {
override def map[A, B](fa: Eval[A])(f: A => B): Eval[B] = fa.map(f)
def pure[A](a: A): Eval[A] = Now(a)
Expand Down
17 changes: 8 additions & 9 deletions core/src/main/scala/cats/Invariant.scala
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ trait Invariant[F[_]] extends Serializable { self =>

@suppressUnusedImportWarningForScalaVersionSpecific
object Invariant extends ScalaVersionSpecificInvariantInstances with InvariantInstances0 {
implicit def catsInstancesForId
: Distributive[Id] with Bimonad[Id] with CommutativeMonad[Id] with NonEmptyTraverse[Id] =
implicit def catsInstancesForId: Distributive[Id] & Bimonad[Id] & CommutativeMonad[Id] & NonEmptyTraverse[Id] =
cats.catsInstancesForId
@deprecated("Added for bincompat", "2.8.0")
@targetName3("catsInstancesForId")
Expand All @@ -134,13 +133,13 @@ object Invariant extends ScalaVersionSpecificInvariantInstances with InvariantIn
implicit def catsMonadErrorForEither[A]: MonadError[Either[A, *], A] =
cats.instances.either.catsStdInstancesForEither[A]
implicit def catsInstancesForOption
: MonadError[Option, Unit] with Alternative[Option] with CoflatMap[Option] with CommutativeMonad[Option] =
: MonadError[Option, Unit] & Alternative[Option] & CoflatMap[Option] & CommutativeMonad[Option] =
cats.instances.option.catsStdInstancesForOption
implicit def catsInstancesForList: Monad[List] with Alternative[List] with CoflatMap[List] =
implicit def catsInstancesForList: Monad[List] & Alternative[List] & CoflatMap[List] =
cats.instances.list.catsStdInstancesForList
implicit def catsInstancesForVector: Monad[Vector] with Alternative[Vector] with CoflatMap[Vector] =
implicit def catsInstancesForVector: Monad[Vector] & Alternative[Vector] & CoflatMap[Vector] =
cats.instances.vector.catsStdInstancesForVector
implicit def catsInstancesForQueue: Monad[Queue] with Alternative[Queue] with CoflatMap[Queue] =
implicit def catsInstancesForQueue: Monad[Queue] & Alternative[Queue] & CoflatMap[Queue] =
cats.instances.queue.catsStdInstancesForQueue
implicit def catsMonadForTailRec: Monad[TailRec] = cats.instances.tailRec.catsInstancesForTailRec

Expand All @@ -152,7 +151,7 @@ object Invariant extends ScalaVersionSpecificInvariantInstances with InvariantIn
cats.instances.function.catsStdContravariantMonoidalForFunction1[R]
implicit def catsFunctorForPair: Functor[λ[P => (P, P)]] = cats.instances.tuple.catsDataFunctorForPair

implicit def catsInstancesForTry: MonadThrow[Try] with CoflatMap[Try] =
implicit def catsInstancesForTry: MonadThrow[Try] & CoflatMap[Try] =
cats.instances.try_.catsStdInstancesForTry

/**
Expand All @@ -166,7 +165,7 @@ object Invariant extends ScalaVersionSpecificInvariantInstances with InvariantIn
*/
implicit def catsInstancesForFuture(implicit
ec: ExecutionContext
): MonadThrow[Future] with CoflatMap[Future] =
): MonadThrow[Future] & CoflatMap[Future] =
cats.instances.future.catsStdInstancesForFuture(ec)

implicit def catsContravariantMonoidalForOrder: ContravariantMonoidal[Order] =
Expand Down Expand Up @@ -339,7 +338,7 @@ private trait InvariantInstances1 extends InvariantInstances2 {
private[cats] trait InvariantInstances2 extends cats.instances.NTupleMonadInstances with TupleInstances0 {
implicit def catsApplicativeForArrow[F[_, _], A](implicit F: Arrow[F]): Applicative[F[A, *]] =
new ArrowApplicative[F, A](F)
implicit def catsInstancesForSeq: Monad[Seq] with Alternative[Seq] with CoflatMap[Seq] =
implicit def catsInstancesForSeq: Monad[Seq] & Alternative[Seq] & CoflatMap[Seq] =
cats.instances.seq.catsStdInstancesForSeq
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/UnorderedFoldable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ object UnorderedFoldable
implicit def catsTraverseForTry: Traverse[Try] = cats.instances.try_.catsStdInstancesForTry

@deprecated("Use catsStdInstancesForTuple2 in cats.instances.NTupleMonadInstances", "2.4.0")
def catsInstancesForTuple[A]: Traverse[(A, *)] with Reducible[(A, *)] =
def catsInstancesForTuple[A]: Traverse[(A, *)] & Reducible[(A, *)] =
cats.instances.tuple.catsStdInstancesForTuple2[A]

/**
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/scala/cats/arrow/Compose.scala
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ trait Compose[F[_, _]] extends Serializable { self =>
}

object Compose {
implicit def catsInstancesForFunction1: ArrowChoice[Function1] with CommutativeArrow[Function1] =
implicit def catsInstancesForFunction1: ArrowChoice[Function1] & CommutativeArrow[Function1] =
cats.instances.function.catsStdInstancesForFunction1
implicit def catsComposeForMap: Compose[Map] = cats.instances.map.catsStdComposeForMap

implicit def catsInstancesForPartialFunction: ArrowChoice[PartialFunction] with CommutativeArrow[PartialFunction] =
implicit def catsInstancesForPartialFunction: ArrowChoice[PartialFunction] & CommutativeArrow[PartialFunction] =
cats.instances.partialFunction.catsStdInstancesForPartialFunction

/**
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/data/AndThen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ abstract private[data] class AndThenInstances0 extends AndThenInstances1 {
* [[cats.arrow.CommutativeArrow CommutativeArrow]] instances
* for [[AndThen]].
*/
implicit val catsDataArrowForAndThen: ArrowChoice[AndThen] with CommutativeArrow[AndThen] =
implicit val catsDataArrowForAndThen: ArrowChoice[AndThen] & CommutativeArrow[AndThen] =
new ArrowChoice[AndThen] with CommutativeArrow[AndThen] {
// Piggybacking on the instance for Function1
private[this] val fn1 = instances.all.catsStdInstancesForFunction1
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/scala/cats/data/Chain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ sealed abstract private[data] class ChainInstances extends ChainInstances1 {
implicit def catsDataMonoidForChain[A]: Monoid[Chain[A]] = theMonoid.asInstanceOf[Monoid[Chain[A]]]

implicit val catsDataInstancesForChain
: Traverse[Chain] with Alternative[Chain] with Monad[Chain] with CoflatMap[Chain] with Align[Chain] =
: Traverse[Chain] & Alternative[Chain] & Monad[Chain] & CoflatMap[Chain] & Align[Chain] =
new Traverse[Chain] with Alternative[Chain] with Monad[Chain] with CoflatMap[Chain] with Align[Chain] {
def foldLeft[A, B](fa: Chain[A], b: B)(f: (B, A) => B): B =
fa.foldLeft(b)(f)
Expand Down Expand Up @@ -1357,7 +1357,7 @@ sealed abstract private[data] class ChainInstances extends ChainInstances1 {
}

implicit val catsDataTraverseFilterForChain: TraverseFilter[Chain] = new TraverseFilter[Chain] {
def traverse: Traverse[Chain] with Alternative[Chain] = Chain.catsDataInstancesForChain
def traverse: Traverse[Chain] & Alternative[Chain] = Chain.catsDataInstancesForChain

override def filter[A](fa: Chain[A])(f: A => Boolean): Chain[A] = fa.filter(f)

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/data/IndexedStateT.scala
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ sealed abstract private[data] class IndexedStateTInstances extends IndexedStateT
implicit def catsDataAlternativeForIndexedStateT[F[_], S](implicit
FM: Monad[F],
FA: Alternative[F]
): Alternative[IndexedStateT[F, S, S, *]] with Monad[IndexedStateT[F, S, S, *]] =
): Alternative[IndexedStateT[F, S, S, *]] & Monad[IndexedStateT[F, S, S, *]] =
new IndexedStateTAlternative[F, S] { implicit def F = FM; implicit def G = FA }

implicit def catsDataDeferForIndexedStateT[F[_], SA, SB](implicit F: Defer[F]): Defer[IndexedStateT[F, SA, SB, *]] =
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/data/Kleisli.scala
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ sealed abstract private[data] class KleisliInstances0 extends KleisliInstances0_

implicit def catsDataCommutativeArrowForKleisli[F[_]](implicit
M: CommutativeMonad[F]
): CommutativeArrow[Kleisli[F, *, *]] with ArrowChoice[Kleisli[F, *, *]] =
): CommutativeArrow[Kleisli[F, *, *]] & ArrowChoice[Kleisli[F, *, *]] =
new KleisliCommutativeArrow[F] { def F: CommutativeMonad[F] = M }

implicit def catsDataCommutativeMonadForKleisli[F[_], A](implicit
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/data/Newtype.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ package data
private[data] trait Newtype { self =>
private[data] type Base
private[data] trait Tag extends Any
type Type[A] <: Base with Tag
type Type[A] <: Base & Tag
}
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/data/Newtype2.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ package data
private[data] trait Newtype2 { self =>
private[data] type Base
private[data] trait Tag extends Any
type Type[A, +B] <: Base with Tag
type Type[A, +B] <: Base & Tag
}
18 changes: 9 additions & 9 deletions core/src/main/scala/cats/data/NonEmptyChain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ object NonEmptyChainImpl extends NonEmptyChainInstances with ScalaVersionSpecifi
private[data] type Base
private[data] trait Tag extends Any
/* aliased in data package as NonEmptyChain */
type Type[+A] <: Base with Tag
type Type[+A] <: Base & Tag

private[data] def create[A](s: Chain[A]): Type[A] =
s.asInstanceOf[Type[A]]
Expand Down Expand Up @@ -624,16 +624,16 @@ sealed abstract private[data] class NonEmptyChainInstances extends NonEmptyChain
"maintained for the sake of binary compatibility only, use catsDataInstancesForNonEmptyChainBinCompat1 instead",
"2.9.0"
)
def catsDataInstancesForNonEmptyChain: SemigroupK[NonEmptyChain]
with NonEmptyTraverse[NonEmptyChain]
with Bimonad[NonEmptyChain]
with Align[NonEmptyChain] =
def catsDataInstancesForNonEmptyChain
: SemigroupK[NonEmptyChain] & NonEmptyTraverse[NonEmptyChain] & Bimonad[NonEmptyChain] & Align[
NonEmptyChain
] =
catsDataInstancesForNonEmptyChainBinCompat1

implicit val catsDataInstancesForNonEmptyChainBinCompat1: Align[NonEmptyChain]
with Bimonad[NonEmptyChain]
with NonEmptyAlternative[NonEmptyChain]
with NonEmptyTraverse[NonEmptyChain] =
implicit val catsDataInstancesForNonEmptyChainBinCompat1
: Align[NonEmptyChain] & Bimonad[NonEmptyChain] & NonEmptyAlternative[NonEmptyChain] & NonEmptyTraverse[
NonEmptyChain
] =
new AbstractNonEmptyInstances[Chain, NonEmptyChain] with Align[NonEmptyChain] {
def extract[A](fa: NonEmptyChain[A]): A = fa.head

Expand Down
10 changes: 5 additions & 5 deletions core/src/main/scala/cats/data/NonEmptyList.scala
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ sealed abstract private[data] class NonEmptyListInstances extends NonEmptyListIn
"2.9.0"
)
def catsDataInstancesForNonEmptyList
: SemigroupK[NonEmptyList] with Bimonad[NonEmptyList] with NonEmptyTraverse[NonEmptyList] with Align[NonEmptyList] =
: SemigroupK[NonEmptyList] & Bimonad[NonEmptyList] & NonEmptyTraverse[NonEmptyList] & Align[NonEmptyList] =
catsDataInstancesForNonEmptyListBinCompat1

/**
Expand All @@ -805,10 +805,10 @@ sealed abstract private[data] class NonEmptyListInstances extends NonEmptyListIn
*
* Also see the discussion: PR #3541 and issue #3069.
*/
implicit val catsDataInstancesForNonEmptyListBinCompat1: NonEmptyAlternative[NonEmptyList]
with Bimonad[NonEmptyList]
with NonEmptyTraverse[NonEmptyList]
with Align[NonEmptyList] =
implicit val catsDataInstancesForNonEmptyListBinCompat1
: NonEmptyAlternative[NonEmptyList] & Bimonad[NonEmptyList] & NonEmptyTraverse[NonEmptyList] & Align[
NonEmptyList
] =
new NonEmptyReducible[NonEmptyList, List]
with NonEmptyAlternative[NonEmptyList]
with Bimonad[NonEmptyList]
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/scala/cats/data/NonEmptyMapImpl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ sealed class NonEmptyMapOps[K, A](private[data] val value: NonEmptyMap[K, A]) {
sealed abstract private[data] class NonEmptyMapInstances extends NonEmptyMapInstances0 {

implicit def catsDataInstancesForNonEmptyMap[K]
: SemigroupK[NonEmptyMap[K, *]] with NonEmptyTraverse[NonEmptyMap[K, *]] with Align[NonEmptyMap[K, *]] =
: SemigroupK[NonEmptyMap[K, *]] & NonEmptyTraverse[NonEmptyMap[K, *]] & Align[NonEmptyMap[K, *]] =
new SemigroupK[NonEmptyMap[K, *]] with NonEmptyTraverse[NonEmptyMap[K, *]] with Align[NonEmptyMap[K, *]] {

override def map[A, B](fa: NonEmptyMap[K, A])(f: A => B): NonEmptyMap[K, B] =
Expand Down Expand Up @@ -354,7 +354,7 @@ sealed abstract private[data] class NonEmptyMapInstances extends NonEmptyMapInst
@deprecated("Use catsDataInstancesForNonEmptyMap override without Order", "2.2.0-M3")
def catsDataInstancesForNonEmptyMap[K](
orderK: Order[K]
): SemigroupK[NonEmptyMap[K, *]] with NonEmptyTraverse[NonEmptyMap[K, *]] with Align[NonEmptyMap[K, *]] =
): SemigroupK[NonEmptyMap[K, *]] & NonEmptyTraverse[NonEmptyMap[K, *]] & Align[NonEmptyMap[K, *]] =
catsDataInstancesForNonEmptyMap[K]

implicit def catsDataHashForNonEmptyMap[K: Hash, A: Hash]: Hash[NonEmptyMap[K, A]] =
Expand Down
8 changes: 3 additions & 5 deletions core/src/main/scala/cats/data/NonEmptySeq.scala
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ sealed abstract private[data] class NonEmptySeqInstances {
"2.9.0"
)
def catsDataInstancesForNonEmptySeq
: SemigroupK[NonEmptySeq] with Bimonad[NonEmptySeq] with NonEmptyTraverse[NonEmptySeq] with Align[NonEmptySeq] =
: SemigroupK[NonEmptySeq] & Bimonad[NonEmptySeq] & NonEmptyTraverse[NonEmptySeq] & Align[NonEmptySeq] =
catsDataInstancesForNonEmptySeqBinCompat1

/**
Expand All @@ -412,10 +412,8 @@ sealed abstract private[data] class NonEmptySeqInstances {
*
* Also see the discussion: PR #3541 and issue #3069.
*/
implicit val catsDataInstancesForNonEmptySeqBinCompat1: NonEmptyAlternative[NonEmptySeq]
with Bimonad[NonEmptySeq]
with NonEmptyTraverse[NonEmptySeq]
with Align[NonEmptySeq] =
implicit val catsDataInstancesForNonEmptySeqBinCompat1
: NonEmptyAlternative[NonEmptySeq] & Bimonad[NonEmptySeq] & NonEmptyTraverse[NonEmptySeq] & Align[NonEmptySeq] =
new NonEmptyReducible[NonEmptySeq, Seq]
with NonEmptyAlternative[NonEmptySeq]
with Bimonad[NonEmptySeq]
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/data/NonEmptySet.scala
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ sealed class NonEmptySetOps[A](private[data] val value: NonEmptySet[A]) {
}

sealed abstract private[data] class NonEmptySetInstances extends NonEmptySetInstances0 {
implicit val catsDataInstancesForNonEmptySet: SemigroupK[NonEmptySet] with Reducible[NonEmptySet] =
implicit val catsDataInstancesForNonEmptySet: SemigroupK[NonEmptySet] & Reducible[NonEmptySet] =
new SemigroupK[NonEmptySet] with Reducible[NonEmptySet] {

def combineK[A](a: NonEmptySet[A], b: NonEmptySet[A]): NonEmptySet[A] =
Expand Down
Loading