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

Yet some more uniquifying of implicit names #1122

Merged
merged 2 commits into from
Jun 15, 2016
Merged
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
14 changes: 7 additions & 7 deletions core/src/main/scala/cats/Eval.scala
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ object Eval extends EvalInstances {

private[cats] trait EvalInstances extends EvalInstances0 {

implicit val evalBimonad: Bimonad[Eval] with MonadRec[Eval] =
implicit val catsBimonadForEval: Bimonad[Eval] with MonadRec[Eval] =
new Bimonad[Eval] with MonadRec[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 All @@ -310,35 +310,35 @@ private[cats] trait EvalInstances extends EvalInstances0 {
})
}

implicit def evalOrder[A: Order]: Order[Eval[A]] =
implicit def catsOrderForEval[A: Order]: Order[Eval[A]] =
new Order[Eval[A]] {
def compare(lx: Eval[A], ly: Eval[A]): Int =
lx.value compare ly.value
}

implicit def evalGroup[A: Group]: Group[Eval[A]] =
implicit def catsGroupForEval[A: Group]: Group[Eval[A]] =
new EvalGroup[A] { val algebra: Group[A] = Group[A] }
}

private[cats] trait EvalInstances0 extends EvalInstances1 {
implicit def evalPartialOrder[A: PartialOrder]: PartialOrder[Eval[A]] =
implicit def catsPartialOrderForEval[A: PartialOrder]: PartialOrder[Eval[A]] =
new PartialOrder[Eval[A]] {
def partialCompare(lx: Eval[A], ly: Eval[A]): Double =
lx.value partialCompare ly.value
}

implicit def evalMonoid[A: Monoid]: Monoid[Eval[A]] =
implicit def catsMonoidForEval[A: Monoid]: Monoid[Eval[A]] =
new EvalMonoid[A] { val algebra = Monoid[A] }
}

private[cats] trait EvalInstances1 {
implicit def evalEq[A: Eq]: Eq[Eval[A]] =
implicit def catsEqForEval[A: Eq]: Eq[Eval[A]] =
new Eq[Eval[A]] {
def eqv(lx: Eval[A], ly: Eval[A]): Boolean =
lx.value === ly.value
}

implicit def evalSemigroup[A: Semigroup]: Semigroup[Eval[A]] =
implicit def catsSemigroupForEval[A: Semigroup]: Semigroup[Eval[A]] =
new EvalSemigroup[A] { val algebra = Semigroup[A] }
}

Expand Down
4 changes: 2 additions & 2 deletions core/src/main/scala/cats/NotNull.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ object NotNull {

implicit def `If you are seeing this, you probably need to add an explicit type parameter somewhere, because Null is being inferred.`: NotNull[Null] = throw ambiguousException

implicit def ambiguousNull2: NotNull[Null] = throw ambiguousException
implicit def catsAmbiguousNotNullNull2: NotNull[Null] = throw ambiguousException

implicit def notNull[A]: NotNull[A] = singleton.asInstanceOf[NotNull[A]]
implicit def catsNotNullForA[A]: NotNull[A] = singleton.asInstanceOf[NotNull[A]]
}
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/Show.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ object Show {
def show(a: A): String = a.toString
}

implicit val showContravariant: Contravariant[Show] = new Contravariant[Show] {
implicit val catsContravariantForShow: Contravariant[Show] = new Contravariant[Show] {
def contramap[A, B](fa: Show[A])(f: B => A): Show[B] =
show[B](fa.show _ compose f)
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/Trivial.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ object Trivial {
type P3[A, B, C] = Trivial
type P3H1[F[_], A, B, C] = Trivial

implicit val manifest: Trivial = new Trivial {}
implicit val catsTrivialInstance: Trivial = new Trivial {}
}
20 changes: 10 additions & 10 deletions core/src/main/scala/cats/Unapply.scala
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ object Unapply extends Unapply2Instances {
type A = AA
}

implicit def unapply1[TC[_[_]], F[_], AA](implicit tc: TC[F])
implicit def catsUnapply1[TC[_[_]], F[_], AA](implicit tc: TC[F])
: Aux1[TC,F[AA],F,AA] =
new Unapply[TC,F[AA]] {
type M[X] = F[X]
Expand Down Expand Up @@ -80,29 +80,29 @@ private[cats] sealed abstract class Unapply2Instances extends Unapply3Instances
}


implicit def unapply2left[TC[_[_]], F[_,_], AA, B](implicit tc: TC[F[?,B]]): Aux2Left[TC,F[AA,B], F, AA, B] = new Unapply[TC, F[AA,B]] {
implicit def catsUnapply2left[TC[_[_]], F[_,_], AA, B](implicit tc: TC[F[?,B]]): Aux2Left[TC,F[AA,B], F, AA, B] = new Unapply[TC, F[AA,B]] {
type M[X] = F[X, B]
type A = AA
def TC: TC[F[?, B]] = tc
def subst: F[AA, B] => M[A] = identity
}

implicit def unapply2right[TC[_[_]], F[_,_], AA, B](implicit tc: TC[F[AA,?]]): Aux2Right[TC,F[AA,B], F, AA, B] = new Unapply[TC, F[AA,B]] {
implicit def catsUnapply2right[TC[_[_]], F[_,_], AA, B](implicit tc: TC[F[AA,?]]): Aux2Right[TC,F[AA,B], F, AA, B] = new Unapply[TC, F[AA,B]] {
type M[X] = F[AA, X]
type A = B
def TC: TC[F[AA, ?]] = tc
def subst: F[AA, B] => M[A] = identity
}


implicit def unapply2leftK[TC[_[_]], F[_,_[_]], AA, B[_]](implicit tc: TC[F[?,B]]): Aux2LeftK[TC,F[AA,B], F, AA, B] = new Unapply[TC, F[AA,B]] {
implicit def catsUnapply2leftK[TC[_[_]], F[_,_[_]], AA, B[_]](implicit tc: TC[F[?,B]]): Aux2LeftK[TC,F[AA,B], F, AA, B] = new Unapply[TC, F[AA,B]] {
type M[X] = F[X, B]
type A = AA
def TC: TC[F[?, B]] = tc
def subst: F[AA, B] => M[A] = identity
}

implicit def unapply2rightK[TC[_[_]], F[_[_],_], AA[_], B](implicit tc: TC[F[AA,?]]): Aux2RightK[TC,F[AA,B], F, AA, B] = new Unapply[TC, F[AA,B]] {
implicit def catsUnapply2rightK[TC[_[_]], F[_[_],_], AA[_], B](implicit tc: TC[F[AA,?]]): Aux2RightK[TC,F[AA,B], F, AA, B] = new Unapply[TC, F[AA,B]] {
type M[X] = F[AA, X]
type A = B
def TC: TC[F[AA, ?]] = tc
Expand All @@ -114,14 +114,14 @@ private[cats] sealed abstract class Unapply2Instances extends Unapply3Instances
// STEW: I'm not sure why these Nothing cases are needed and aren't
// just caught by the generic cases, I'd love for someone to figure
// that out and report back.
implicit def unapply2leftN[TC[_[_]], F[_,+_], AA](implicit tc: TC[F[?,Nothing]]): Aux2Left[TC,F[AA,Nothing], F, AA, Nothing] = new Unapply[TC, F[AA,Nothing]] {
implicit def catsUnapply2leftN[TC[_[_]], F[_,+_], AA](implicit tc: TC[F[?,Nothing]]): Aux2Left[TC,F[AA,Nothing], F, AA, Nothing] = new Unapply[TC, F[AA,Nothing]] {
type M[X] = F[X, Nothing]
type A = AA
def TC: TC[F[?, Nothing]] = tc
def subst: F[AA, Nothing] => M[A] = identity
}

implicit def unapply2rightN[TC[_[_]], F[+_,_], B](implicit tc: TC[F[Nothing,?]]): Aux2Right[TC,F[Nothing,B], F, Nothing, B] = new Unapply[TC, F[Nothing,B]] {
implicit def catsUnapply2rightN[TC[_[_]], F[+_,_], B](implicit tc: TC[F[Nothing,?]]): Aux2Right[TC,F[Nothing,B], F, Nothing, B] = new Unapply[TC, F[Nothing,B]] {
type M[X] = F[Nothing, X]
type A = B
def TC: TC[F[Nothing, ?]] = tc
Expand Down Expand Up @@ -155,14 +155,14 @@ private[cats] sealed abstract class Unapply3Instances {
}


implicit def unapply3MTLeft[TC[_[_]], F[_[_],_,_], AA[_], B, C](implicit tc: TC[F[AA,?,C]]): Aux3MTLeft[TC,F[AA, B, C], F, AA, B, C] = new Unapply[TC, F[AA,B,C]] {
implicit def catsUnapply3MTLeft[TC[_[_]], F[_[_],_,_], AA[_], B, C](implicit tc: TC[F[AA,?,C]]): Aux3MTLeft[TC,F[AA, B, C], F, AA, B, C] = new Unapply[TC, F[AA,B,C]] {
type M[X] = F[AA, X, C]
type A = B
def TC: TC[F[AA, ?, C]] = tc
def subst: F[AA, B, C] => M[A] = identity
}

implicit def unapply3MTright[TC[_[_]], F[_[_],_,_], AA[_], B, C](implicit tc: TC[F[AA,B,?]]): Aux3MTRight[TC,F[AA,B,C], F, AA, B, C] = new Unapply[TC, F[AA,B,C]] {
implicit def catsUnapply3MTright[TC[_[_]], F[_[_],_,_], AA[_], B, C](implicit tc: TC[F[AA,B,?]]): Aux3MTRight[TC,F[AA,B,C], F, AA, B, C] = new Unapply[TC, F[AA,B,C]] {
type M[X] = F[AA, B, X]
type A = C
def TC: TC[F[AA, B, ?]] = tc
Expand All @@ -174,7 +174,7 @@ private[cats] sealed abstract class Unapply3Instances {
type A = C
}

implicit def unapply3Nested[TC[_[_]], MA, F[_[_], _[_], _], AA[_], BB[_], C](implicit tc: TC[F[AA, BB, ?]]): Aux3Nested[TC, F[AA, BB, C], F, AA, BB, C] = new Unapply[TC, F[AA, BB, C]] {
implicit def catsUnapply3Nested[TC[_[_]], MA, F[_[_], _[_], _], AA[_], BB[_], C](implicit tc: TC[F[AA, BB, ?]]): Aux3Nested[TC, F[AA, BB, C], F, AA, BB, C] = new Unapply[TC, F[AA, BB, C]] {
type M[X] = F[AA, BB, X]
type A = C
def TC: TC[F[AA, BB, ?]] = tc
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/data/Func.scala
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ sealed abstract class AppFunc[F[_], A, B] extends Func[F, A, B] { self =>
}

def compose[G[_], C](g: AppFunc[G, C, A]): AppFunc[Nested[G, F, ?], C, B] = {
implicit val gfApplicative: Applicative[Nested[G, F, ?]] = Nested.nestedApplicative[G, F](g.F, F)
implicit val gfApplicative: Applicative[Nested[G, F, ?]] = Nested.catsDataApplicativeForNested[G, F](g.F, F)
Func.appFunc[Nested[G, F, ?], C, B]({
c: C => Nested(g.F.map(g.run(c))(self.run))
})
Expand Down
14 changes: 7 additions & 7 deletions core/src/main/scala/cats/data/IdT.scala
Original file line number Diff line number Diff line change
Expand Up @@ -70,38 +70,38 @@ private[data] sealed trait IdTTraverse[F[_]] extends Traverse[IdT[F, ?]] with Id
}

private[data] sealed abstract class IdTInstances1 {
implicit def idTFunctor[F[_]](implicit F: Functor[F]): Functor[IdT[F, ?]] =
implicit def catsDataFunctorForIdT[F[_]](implicit F: Functor[F]): Functor[IdT[F, ?]] =
new IdTFunctor[F] {
implicit val F0: Functor[F] = F
}
}

private[data] sealed abstract class IdTInstances0 extends IdTInstances1 {

implicit def idTMonad[F[_]](implicit F: Monad[F]): Monad[IdT[F, ?]] =
implicit def catsDataMonadForIdT[F[_]](implicit F: Monad[F]): Monad[IdT[F, ?]] =
new IdTMonad[F] {
implicit val F0: Monad[F] = F
}

implicit def idTFoldable[F[_]](implicit F: Foldable[F]): Foldable[IdT[F, ?]] =
implicit def catsDataFoldableForIdT[F[_]](implicit F: Foldable[F]): Foldable[IdT[F, ?]] =
new IdTFoldable[F] {
implicit val F0: Foldable[F] = F
}

implicit def idTOrder[F[_], A](implicit F: Order[F[A]]): Order[IdT[F, A]] =
implicit def catsDataOrderForIdT[F[_], A](implicit F: Order[F[A]]): Order[IdT[F, A]] =
F.on(_.value)
}

private[data] sealed abstract class IdTInstances extends IdTInstances0 {

implicit def idTTraverse[F[_]](implicit F: Traverse[F]): Traverse[IdT[F, ?]] =
implicit def catsDataTraverseForIdT[F[_]](implicit F: Traverse[F]): Traverse[IdT[F, ?]] =
new IdTTraverse[F] {
implicit val F0: Traverse[F] = F
}

implicit def idTEq[F[_], A](implicit F: Eq[F[A]]): Eq[IdT[F, A]] =
implicit def catsDataEqForIdT[F[_], A](implicit F: Eq[F[A]]): Eq[IdT[F, A]] =
F.on(_.value)

implicit def idTShow[F[_], A](implicit F: Show[F[A]]): Show[IdT[F, A]] =
implicit def catsDataShowForIdT[F[_], A](implicit F: Show[F[A]]): Show[IdT[F, A]] =
functor.Contravariant[Show].contramap(F)(_.value)
}
32 changes: 16 additions & 16 deletions core/src/main/scala/cats/data/Nested.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ final case class Nested[F[_], G[_], A](value: F[G[A]])
object Nested extends NestedInstances

private[data] sealed abstract class NestedInstances extends NestedInstances1 {
implicit def nestedEq[F[_], G[_], A](implicit FGA: Eq[F[G[A]]]): Eq[Nested[F, G, A]] =
implicit def catsDataEqForNested[F[_], G[_], A](implicit FGA: Eq[F[G[A]]]): Eq[Nested[F, G, A]] =
FGA.on(_.value)

implicit def nestedTraverse[F[_]: Traverse, G[_]: Traverse]: Traverse[Nested[F, G, ?]] =
implicit def catsDataTraverseForNested[F[_]: Traverse, G[_]: Traverse]: Traverse[Nested[F, G, ?]] =
new Traverse[Nested[F, G, ?]] {
val instance = Traverse[F].compose[G]

Expand All @@ -53,7 +53,7 @@ private[data] sealed abstract class NestedInstances extends NestedInstances1 {
}

private[data] sealed abstract class NestedInstances1 extends NestedInstances2 {
implicit def nestedReducible[F[_]: Reducible, G[_]: Reducible]: Reducible[Nested[F, G, ?]] =
implicit def catsDataReducibleForNested[F[_]: Reducible, G[_]: Reducible]: Reducible[Nested[F, G, ?]] =
new Reducible[Nested[F, G, ?]] {
val instance = Reducible[F].compose[G]

Expand All @@ -70,7 +70,7 @@ private[data] sealed abstract class NestedInstances1 extends NestedInstances2 {
instance.foldRight(fga.value, lb)(f)
}

implicit def nestedContravariant[F[_]: Contravariant, G[_]: Contravariant]: Functor[Nested[F, G, ?]] =
implicit def catsDataContravariantForNested[F[_]: Contravariant, G[_]: Contravariant]: Functor[Nested[F, G, ?]] =
new Functor[Nested[F, G, ?]] {
val instance = Contravariant[F].compose[G]

Expand All @@ -81,7 +81,7 @@ private[data] sealed abstract class NestedInstances1 extends NestedInstances2 {
}

private[data] sealed abstract class NestedInstances2 extends NestedInstances3 {
implicit def nestedFoldable[F[_]: Foldable, G[_]: Foldable]: Foldable[Nested[F, G, ?]] =
implicit def catsDataFoldableForNested[F[_]: Foldable, G[_]: Foldable]: Foldable[Nested[F, G, ?]] =
new Foldable[Nested[F, G, ?]] {
val instance = Foldable[F].compose[G]

Expand All @@ -93,7 +93,7 @@ private[data] sealed abstract class NestedInstances2 extends NestedInstances3 {
}


implicit def nestedContravariantCovariant[F[_]: Contravariant, G[_]: Functor]: Contravariant[Nested[F, G, ?]] =
implicit def catsDataContravariantForCovariantNested[F[_]: Contravariant, G[_]: Functor]: Contravariant[Nested[F, G, ?]] =
new Contravariant[Nested[F, G, ?]] {
val instance = Contravariant[F].composeFunctor[G]

Expand All @@ -103,7 +103,7 @@ private[data] sealed abstract class NestedInstances2 extends NestedInstances3 {
}

private[data] sealed abstract class NestedInstances3 extends NestedInstances4 {
implicit def nestedAlternative[F[_]: Alternative, G[_]: Applicative]: Alternative[Nested[F, G, ?]] =
implicit def catsDataAlternativeForNested[F[_]: Alternative, G[_]: Applicative]: Alternative[Nested[F, G, ?]] =
new Alternative[Nested[F, G, ?]] {
val instance = Alternative[F].compose[G]

Expand All @@ -126,7 +126,7 @@ private[data] sealed abstract class NestedInstances3 extends NestedInstances4 {
def empty[A]: Nested[F, G, A] = Nested(instance.empty[A])
}

implicit def nestedCovariantContravariant[F[_]: Functor, G[_]: Contravariant]: Contravariant[Nested[F, G, ?]] =
implicit def catsDataContravariantForContravariantNested[F[_]: Functor, G[_]: Contravariant]: Contravariant[Nested[F, G, ?]] =
new Contravariant[Nested[F, G, ?]] {
val instance = Functor[F].composeContravariant[G]

Expand All @@ -136,7 +136,7 @@ private[data] sealed abstract class NestedInstances3 extends NestedInstances4 {
}

private[data] sealed abstract class NestedInstances4 extends NestedInstances5 {
implicit def nestedApplicative[F[_]: Applicative, G[_]: Applicative]: Applicative[Nested[F, G, ?]] =
implicit def catsDataApplicativeForNested[F[_]: Applicative, G[_]: Applicative]: Applicative[Nested[F, G, ?]] =
new Applicative[Nested[F, G, ?]] {
val instance = Applicative[F].compose[G]

Expand All @@ -155,7 +155,7 @@ private[data] sealed abstract class NestedInstances4 extends NestedInstances5 {
def pure[A](x: A): Nested[F, G, A] = Nested(instance.pure(x))
}

implicit def nestedMonoidK[F[_]: MonoidK, G[_]]: MonoidK[Nested[F, G, ?]] =
implicit def catsDataMonoidKForNested[F[_]: MonoidK, G[_]]: MonoidK[Nested[F, G, ?]] =
new MonoidK[Nested[F, G, ?]] {
val instance = MonoidK[F].compose[G]

Expand All @@ -166,7 +166,7 @@ private[data] sealed abstract class NestedInstances4 extends NestedInstances5 {
}

private[data] sealed abstract class NestedInstances5 extends NestedInstances6 {
implicit def nestedApply[F[_]: Apply, G[_]: Apply]: Apply[Nested[F, G, ?]] =
implicit def catsDataApplyForNested[F[_]: Apply, G[_]: Apply]: Apply[Nested[F, G, ?]] =
new Apply[Nested[F, G, ?]] {
val instance = Apply[F].compose[G]

Expand All @@ -180,7 +180,7 @@ private[data] sealed abstract class NestedInstances5 extends NestedInstances6 {
Nested(instance.map(fga.value)(f))
}

implicit def nestedSemigroupK[F[_]: SemigroupK, G[_]]: SemigroupK[Nested[F, G, ?]] =
implicit def catsDataSemigroupKForNested[F[_]: SemigroupK, G[_]]: SemigroupK[Nested[F, G, ?]] =
new SemigroupK[Nested[F, G, ?]] {
val instance = SemigroupK[F].compose[G]

Expand All @@ -189,7 +189,7 @@ private[data] sealed abstract class NestedInstances5 extends NestedInstances6 {
}

private[data] sealed abstract class NestedInstances6 extends NestedInstances7 {
implicit def nestedFunctor[F[_]: Functor, G[_]: Functor]: Functor[Nested[F, G, ?]] =
implicit def catsDataFunctorForNested[F[_]: Functor, G[_]: Functor]: Functor[Nested[F, G, ?]] =
new Functor[Nested[F, G, ?]] {
val instance = Functor[F].compose[G]

Expand All @@ -202,7 +202,7 @@ private[data] sealed abstract class NestedInstances6 extends NestedInstances7 {
}

private[data] sealed abstract class NestedInstances7 extends NestedInstances8 {
implicit def nestedInvariant[F[_]: Invariant, G[_]: Invariant]: Invariant[Nested[F, G, ?]] =
implicit def catsDataInvariantForNested[F[_]: Invariant, G[_]: Invariant]: Invariant[Nested[F, G, ?]] =
new Invariant[Nested[F, G, ?]] {
val instance = Invariant[F].compose[G]

Expand All @@ -212,7 +212,7 @@ private[data] sealed abstract class NestedInstances7 extends NestedInstances8 {
}

private[data] sealed abstract class NestedInstances8 extends NestedInstances9 {
implicit def nestedInvariantCovariant[F[_]: Invariant, G[_]: Functor]: Invariant[Nested[F, G, ?]] =
implicit def catsDataInvariantForCovariantNested[F[_]: Invariant, G[_]: Functor]: Invariant[Nested[F, G, ?]] =
new Invariant[Nested[F, G, ?]] {
val instance = Invariant[F].composeFunctor[G]

Expand All @@ -222,7 +222,7 @@ private[data] sealed abstract class NestedInstances8 extends NestedInstances9 {
}

private[data] sealed abstract class NestedInstances9 {
implicit def nestedInvariantContravariant[F[_]: Invariant, G[_]: Contravariant]: Invariant[Nested[F, G, ?]] =
implicit def catsDataInvariantForNestedContravariant[F[_]: Invariant, G[_]: Contravariant]: Invariant[Nested[F, G, ?]] =
new Invariant[Nested[F, G, ?]] {
val instance = Invariant[F].composeContravariant[G]

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/data/OneAnd.scala
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private[data] sealed trait OneAndInstances extends OneAndLowPriority2 {
}

trait OneAndLowPriority0 {
implicit val nelComonad: Comonad[OneAnd[List, ?]] =
implicit val catsDataComonadForOneAnd: Comonad[OneAnd[List, ?]] =
new Comonad[OneAnd[List, ?]] {
def coflatMap[A, B](fa: OneAnd[List, A])(f: OneAnd[List, A] => B): OneAnd[List, B] = {
@tailrec def consume(as: List[A], buf: ListBuffer[B]): List[B] =
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/scala/cats/data/Validated.scala
Original file line number Diff line number Diff line change
Expand Up @@ -312,20 +312,20 @@ private[data] sealed abstract class ValidatedInstances extends ValidatedInstance

private[data] sealed abstract class ValidatedInstances1 extends ValidatedInstances2 {

implicit def validatedSemigroup[A, B](implicit A: Semigroup[A], B: Semigroup[B]): Semigroup[Validated[A, B]] =
implicit def catsDataSemigroupForValidated[A, B](implicit A: Semigroup[A], B: Semigroup[B]): Semigroup[Validated[A, B]] =
new Semigroup[Validated[A, B]] {
def combine(x: Validated[A, B], y: Validated[A, B]): Validated[A, B] = x combine y
}

implicit def validatedPartialOrder[A: PartialOrder, B: PartialOrder]: PartialOrder[Validated[A,B]] =
implicit def catsDataPartialOrderForValidated[A: PartialOrder, B: PartialOrder]: PartialOrder[Validated[A,B]] =
new PartialOrder[Validated[A,B]] {
def partialCompare(x: Validated[A,B], y: Validated[A,B]): Double = x partialCompare y
override def eqv(x: Validated[A,B], y: Validated[A,B]): Boolean = x === y
}
}

private[data] sealed abstract class ValidatedInstances2 {
implicit def validatedEq[A: Eq, B: Eq]: Eq[Validated[A,B]] =
implicit def catsDataEqForValidated[A: Eq, B: Eq]: Eq[Validated[A,B]] =
new Eq[Validated[A,B]] {
def eqv(x: Validated[A,B], y: Validated[A,B]): Boolean = x === y
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/data/XorT.scala
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ private[data] abstract class XorTInstances extends XorTInstances1 {
val F0: Traverse[F] = F
}

implicit def xortTransLift[E]: TransLift.Aux[XorT[?[_], E, ?], Functor] =
implicit def catsDataTransLiftForXorT[E]: TransLift.Aux[XorT[?[_], E, ?], Functor] =
new TransLift[XorT[?[_], E, ?]] {
type TC[M[_]] = Functor[M]

Expand Down
Loading