Skip to content

Commit

Permalink
use & instead with. prepare Scala 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Dec 23, 2023
1 parent 84abcc4 commit 06a42f1
Show file tree
Hide file tree
Showing 67 changed files with 117 additions and 118 deletions.
2 changes: 1 addition & 1 deletion core/js/src/main/scala/scalaz/std/JsPromise.scala
Expand Up @@ -15,7 +15,7 @@ object jsPromise extends JSPromiseInstances {
implicit def jsPromiseMonoid[A](implicit A: Monoid[A]): Monoid[js.Promise[A]] =
Monoid.liftMonoid[js.Promise, A]

implicit val JSPromiseInstance: Nondeterminism[js.Promise] with MonadError[js.Promise, Any] with Cobind[js.Promise] =
implicit val JSPromiseInstance: Nondeterminism[js.Promise] & MonadError[js.Promise, Any] & Cobind[js.Promise] =
new Nondeterminism[js.Promise] with MonadError[js.Promise, Any] with Cobind[js.Promise] {

def cobind[A, B](fa: js.Promise[A])(f: js.Promise[A] => B): js.Promise[B] =
Expand Down
4 changes: 2 additions & 2 deletions core/jvm/src/main/scala/scalaz/std/java/time.scala
Expand Up @@ -25,14 +25,14 @@ trait TimeInstances {

implicit val instantInstance: Order[Instant] = orderFromInt[Instant](_ compareTo _)

implicit val durationInstance: Monoid[Duration] with Order[Duration] =
implicit val durationInstance: Monoid[Duration] & Order[Duration] =
new Monoid[Duration] with Order[Duration] {
override def zero = Duration.ZERO
override def append(f1: Duration, f2: => Duration) = f1 plus f2
override def order(a1: Duration, a2: Duration) = Ordering.fromInt(a1 compareTo a2)
}

implicit val periodInstance: Monoid[Period] with Equal[Period] =
implicit val periodInstance: Monoid[Period] & Equal[Period] =
new Monoid[Period] with Equal[Period] {
override def zero = Period.ZERO
override def append(f1: Period, f2: => Period) = f1 plus f2
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/scala/scalaz/Associative.scala
Expand Up @@ -39,9 +39,9 @@ object Associative {
////
import Isomorphism._

def fromIso[F[_, _], G[_, _]](D: F <~~> G)(implicit E: Associative[G] with Bifunctor[G]): Associative[F] =
def fromIso[F[_, _], G[_, _]](D: F <~~> G)(implicit E: Associative[G] & Bifunctor[G]): Associative[F] =
new IsomorphismAssociative[F, G] {
override def G: Associative[G] with Bifunctor[G] = E
override def G: Associative[G] & Bifunctor[G] = E
override def iso: F <~~> G = D
}

Expand Down
4 changes: 2 additions & 2 deletions core/src/main/scala/scalaz/Cokleisli.scala
Expand Up @@ -47,10 +47,10 @@ sealed abstract class CokleisliInstances0 {
}

sealed abstract class CokleisliInstances extends CokleisliInstances0 {
implicit def cokleisliMonad[F[_], R]: Monad[Cokleisli[F, R, *]] with BindRec[Cokleisli[F, R, *]] =
implicit def cokleisliMonad[F[_], R]: Monad[Cokleisli[F, R, *]] & BindRec[Cokleisli[F, R, *]] =
new CokleisliMonad[F, R] {}

implicit def cokleisliArrow[F[_]](implicit F0: Comonad[F]): Arrow[Cokleisli[F, *, *]] with ProChoice[Cokleisli[F, *, *]] =
implicit def cokleisliArrow[F[_]](implicit F0: Comonad[F]): Arrow[Cokleisli[F, *, *]] & ProChoice[Cokleisli[F, *, *]] =
new CokleisliArrow[F] {
override def F = F0
}
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/scala/scalaz/Const.scala
Expand Up @@ -93,7 +93,7 @@ sealed abstract class ConstInstances0 extends ConstInstances1 {
val A: Semigroup[A] = implicitly
}

implicit def constInstance1[C: Semigroup]: Apply[Const[C, *]] with Divide[Const[C, *]] =
implicit def constInstance1[C: Semigroup]: Apply[Const[C, *]] & Divide[Const[C, *]] =
new ConstApplyDivide[C] {
val C: Semigroup[C] = implicitly
}
Expand All @@ -110,7 +110,7 @@ sealed abstract class ConstInstances extends ConstInstances0 {
val A: Monoid[A] = implicitly
}

implicit def constInstance2[C: Monoid]: Applicative[Const[C, *]] with Divisible[Const[C, *]] =
implicit def constInstance2[C: Monoid]: Applicative[Const[C, *]] & Divisible[Const[C, *]] =
new ConstApplicativeDivisible[C] {
val C: Monoid[C] = implicitly
}
Expand Down
5 changes: 2 additions & 3 deletions core/src/main/scala/scalaz/CorecursiveList.scala
Expand Up @@ -124,9 +124,8 @@ object CorecursiveList extends CorecursiveListInstances {
}

implicit val covariantInstance:
MonadPlus[CorecursiveList] with Alt[CorecursiveList] with Foldable[CorecursiveList]
with IsEmpty[CorecursiveList] with Align[CorecursiveList]
with Zip[CorecursiveList] =
MonadPlus[CorecursiveList] & Alt[CorecursiveList] & Foldable[CorecursiveList]
& IsEmpty[CorecursiveList] & Align[CorecursiveList] & Zip[CorecursiveList] =
new MonadPlus[CorecursiveList] with Alt[CorecursiveList] with Foldable.FromFoldr[CorecursiveList]
with IsEmpty[CorecursiveList] with Align[CorecursiveList]
with Zip[CorecursiveList] {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/DList.scala
Expand Up @@ -104,7 +104,7 @@ sealed abstract class DListInstances {
}
implicit val dlistIsCovariant: IsCovariant[DList] =
IsCovariant.force[DList]
implicit val dlistMonadPlus: MonadPlus[DList] with Alt[DList] with Traverse[DList] with BindRec[DList] with Zip[DList] with IsEmpty[DList] = new MonadPlus[DList] with Alt[DList] with Traverse[DList] with BindRec[DList] with Zip[DList] with IsEmpty[DList] {
implicit val dlistMonadPlus: MonadPlus[DList] & Alt[DList] & Traverse[DList] & BindRec[DList] & Zip[DList] & IsEmpty[DList] = new MonadPlus[DList] with Alt[DList] with Traverse[DList] with BindRec[DList] with Zip[DList] with IsEmpty[DList] {
def point[A](a: => A) = DList(a)
def bind[A, B](as: DList[A])(f: A => DList[B]) = as flatMap f
def plus[A](a: DList[A], b: => DList[A]) = a ++ b
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/Dequeue.scala
Expand Up @@ -238,7 +238,7 @@ sealed abstract class DequeueInstances {
def append(a: Dequeue[A], b: => Dequeue[A]): Dequeue[A] = a ++ b
}

implicit val dequeueInstances: Traverse[Dequeue] with IsEmpty[Dequeue] with MonadPlus[Dequeue] with Alt[Dequeue] =
implicit val dequeueInstances: Traverse[Dequeue] & IsEmpty[Dequeue] & MonadPlus[Dequeue] & Alt[Dequeue] =
new Traverse[Dequeue] with IsEmpty[Dequeue] with MonadPlus[Dequeue] with Alt[Dequeue] {
override def foldRight[A,B](fa: Dequeue[A], b: => B)(f: (A, => B) =>B): B = fa.foldRight(b)((a,b) => f(a,b))
override def foldLeft[A,B](fa: Dequeue[A], b: B)(f: (B,A)=>B): B = fa.foldLeft(b)(f)
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/Digit.scala
Expand Up @@ -104,7 +104,7 @@ object Digit extends DigitInstances {
}

sealed abstract class DigitInstances {
implicit val digitInstances: Enum[Digit] with Show[Digit] with Monoid[Digit] = new Enum[Digit] with Show[Digit] with Monoid[Digit] {
implicit val digitInstances: Enum[Digit] & Show[Digit] & Monoid[Digit] = new Enum[Digit] with Show[Digit] with Monoid[Digit] {

import std.anyVal._

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/Either.scala
Expand Up @@ -519,7 +519,7 @@ sealed abstract class DisjunctionInstances1 extends DisjunctionInstances2 {
a1 +++ a2
}

implicit def DisjunctionInstances1[L]: Traverse[\/[L, *]] with Monad[\/[L, *]] with BindRec[\/[L, *]] with Cozip[\/[L, *]] with Plus[\/[L, *]] with Alt[\/[L, *]] with Optional[\/[L, *]] with MonadError[\/[L, *], L] =
implicit def DisjunctionInstances1[L]: Traverse[\/[L, *]] & Monad[\/[L, *]] & BindRec[\/[L, *]] & Cozip[\/[L, *]] & Plus[\/[L, *]] & Alt[\/[L, *]] & Optional[\/[L, *]] & MonadError[\/[L, *], L] =
new Traverse[\/[L, *]] with Monad[\/[L, *]] with BindRec[\/[L, *]] with Cozip[\/[L, *]] with Plus[\/[L, *]] with Alt[\/[L, *]] with Optional[\/[L, *]] with MonadError[\/[L, *], L] {
override def map[A, B](fa: L \/ A)(f: A => B) =
fa map f
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/EitherT.scala
Expand Up @@ -332,7 +332,7 @@ sealed abstract class EitherTInstances0 extends EitherTInstances1 {
override def F = F0
}

implicit def eitherTMonadPlusAlt[F[_], L](implicit F0: Monad[F], L0: Monoid[L]): MonadPlus[EitherT[L, F, *]] with Alt[EitherT[L, F, *]] =
implicit def eitherTMonadPlusAlt[F[_], L](implicit F0: Monad[F], L0: Monoid[L]): MonadPlus[EitherT[L, F, *]] & Alt[EitherT[L, F, *]] =
new EitherTMonadPlus[F, L] with Alt[EitherT[L, F, *]] {
override def F = F0
override def G = L0
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/scala/scalaz/Endo.scala
Expand Up @@ -74,7 +74,7 @@ sealed abstract class EndoInstances {
def append(f1: Endo[A], f2: => Endo[A]) = f1 compose f2
def zero = Endo.idEndo
}
implicit val endoInstances: Zip[Endo] with Unzip[Endo] with InvariantFunctor[Endo] = new Zip[Endo] with Unzip[Endo] with InvariantFunctor[Endo] {
implicit val endoInstances: Zip[Endo] & Unzip[Endo] & InvariantFunctor[Endo] = new Zip[Endo] with Unzip[Endo] with InvariantFunctor[Endo] {
def xmap[A, B](fa: Endo[A], f: A => B, g: B => A) =
Endo.endo(g andThen fa.run andThen f)

Expand All @@ -98,7 +98,7 @@ sealed abstract class EndoByNameInstances {
def append(f1: EndoByName[A], f2: => EndoByName[A]) = f1 compose f2
def zero = Endo.idEndoByName
}
implicit val endoInstances: Zip[EndoByName] with Unzip[EndoByName] with InvariantFunctor[EndoByName] = new Zip[EndoByName] with Unzip[EndoByName] with InvariantFunctor[EndoByName] {
implicit val endoInstances: Zip[EndoByName] & Unzip[EndoByName] & InvariantFunctor[EndoByName] = new Zip[EndoByName] with Unzip[EndoByName] with InvariantFunctor[EndoByName] {
def xmap[A, B](fa: EndoByName[A], f: A => B, g: B => A) =
Endo.endoByName(a => f(fa(g(a))))

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/EphemeralStream.scala
Expand Up @@ -152,7 +152,7 @@ sealed abstract class EphemeralStreamInstances {
IsCovariant.force[EphemeralStream]

// TODO more instances
implicit val ephemeralStreamInstance: MonadPlus[EphemeralStream] with Alt[EphemeralStream] with BindRec[EphemeralStream] with scalaz.Zip[EphemeralStream] with Unzip[EphemeralStream] with Align[EphemeralStream] with Traverse[EphemeralStream] with Cobind[EphemeralStream] with IsEmpty[EphemeralStream] = new MonadPlus[EphemeralStream] with Alt[EphemeralStream] with BindRec[EphemeralStream] with Zip[EphemeralStream] with Unzip[EphemeralStream] with Align[EphemeralStream] with Traverse[EphemeralStream] with Cobind[EphemeralStream] with IsEmpty[EphemeralStream] {
implicit val ephemeralStreamInstance: MonadPlus[EphemeralStream] & Alt[EphemeralStream] & BindRec[EphemeralStream] & scalaz.Zip[EphemeralStream] & Unzip[EphemeralStream] & Align[EphemeralStream] & Traverse[EphemeralStream] & Cobind[EphemeralStream] & IsEmpty[EphemeralStream] = new MonadPlus[EphemeralStream] with Alt[EphemeralStream] with BindRec[EphemeralStream] with Zip[EphemeralStream] with Unzip[EphemeralStream] with Align[EphemeralStream] with Traverse[EphemeralStream] with Cobind[EphemeralStream] with IsEmpty[EphemeralStream] {

import EphemeralStream._
override def isEmpty[A](fa: EphemeralStream[A]) = fa.isEmpty
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/FingerTree.scala
Expand Up @@ -1105,7 +1105,7 @@ sealed abstract class IndSeqInstances {
implicit def indSeqEqual[A: Equal]: Equal[IndSeq[A]] =
Equal.equalBy(_.self)

implicit val indSeqInstance: MonadPlus[IndSeq] with Alt[IndSeq] with Traverse[IndSeq] with IsEmpty[IndSeq] =
implicit val indSeqInstance: MonadPlus[IndSeq] & Alt[IndSeq] & Traverse[IndSeq] & IsEmpty[IndSeq] =
new MonadPlus[IndSeq] with Alt[IndSeq] with Traverse[IndSeq] with IsEmpty[IndSeq] with IsomorphismFoldable[IndSeq, FingerTree[Int, *]]{
def G = implicitly
override val naturalTrans: IndSeq ~> FingerTree[Int, *] = new (IndSeq ~> FingerTree[Int, *]) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/Free.scala
Expand Up @@ -431,7 +431,7 @@ sealed abstract class FreeInstances0 extends FreeInstances1 {
}

sealed abstract class FreeInstances extends FreeInstances0 {
implicit def freeMonad[S[_]]: Monad[Free[S, *]] with BindRec[Free[S, *]] =
implicit def freeMonad[S[_]]: Monad[Free[S, *]] & BindRec[Free[S, *]] =
new Monad[Free[S, *]] with BindRec[Free[S, *]] {
override def map[A, B](fa: Free[S, A])(f: A => B) = fa map f
def bind[A, B](a: Free[S, A])(f: A => Free[S, B]) = a flatMap f
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/scala/scalaz/FreeT.scala
Expand Up @@ -257,7 +257,7 @@ sealed abstract class FreeTInstances1 extends FreeTInstances2 {
}

sealed abstract class FreeTInstances0 extends FreeTInstances1 {
implicit def freeTMonad[S[_], M[_]](implicit M0: Applicative[M]): Monad[FreeT[S, M, *]] with BindRec[FreeT[S, M, *]] =
implicit def freeTMonad[S[_], M[_]](implicit M0: Applicative[M]): Monad[FreeT[S, M, *]] & BindRec[FreeT[S, M, *]] =
new FreeTMonad[S, M] {
def M = M0
}
Expand All @@ -271,7 +271,7 @@ sealed abstract class FreeTInstances0 extends FreeTInstances1 {
}

sealed abstract class FreeTInstances extends FreeTInstances0 {
implicit def freeTMonadPlus[S[_], M[_]: ApplicativePlus: BindRec]: MonadPlus[FreeT[S, M, *]] with Alt[FreeT[S, M, *]] =
implicit def freeTMonadPlus[S[_], M[_]: ApplicativePlus: BindRec]: MonadPlus[FreeT[S, M, *]] & Alt[FreeT[S, M, *]] =
new MonadPlus[FreeT[S, M, *]] with Alt[FreeT[S, M, *]] with FreeTPlus[S, M] with FreeTMonad[S, M] {
override def M = implicitly
override def M1 = implicitly
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/IList.scala
Expand Up @@ -582,7 +582,7 @@ sealed abstract class IListInstance0 {

sealed abstract class IListInstances extends IListInstance0 {

implicit val instances: Traverse[IList] with MonadPlus[IList] with Alt[IList] with BindRec[IList] with Zip[IList] with Unzip[IList] with Align[IList] with IsEmpty[IList] with Cobind[IList] =
implicit val instances: Traverse[IList] & MonadPlus[IList] & Alt[IList] & BindRec[IList] & Zip[IList] & Unzip[IList] & Align[IList] & IsEmpty[IList] & Cobind[IList] =

new Traverse[IList] with MonadPlus[IList] with Alt[IList] with BindRec[IList] with Zip[IList] with Unzip[IList] with Align[IList] with IsEmpty[IList] with Cobind[IList] {
override def findLeft[A](fa: IList[A])(f: A => Boolean) =
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/ISet.scala
Expand Up @@ -693,7 +693,7 @@ sealed abstract class ISetInstances {
cord"ISet($content)"
}

implicit def setMonoid[A: Order]: Monoid[ISet[A]] with SemiLattice[ISet[A]] =
implicit def setMonoid[A: Order]: Monoid[ISet[A]] & SemiLattice[ISet[A]] =
new Monoid[ISet[A]] with SemiLattice[ISet[A]] {
def zero: ISet[A] =
empty[A]
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/IStream.scala
Expand Up @@ -100,7 +100,7 @@ object IStream {
private[this] final val __empty = Value(_empty)
private[this] final def nil[A] = __empty.asInstanceOf[Name[IStream[A]]]

implicit val instances: MonadPlus[IStream] with IsEmpty[IStream] with Traverse[IStream] =
implicit val instances: MonadPlus[IStream] & IsEmpty[IStream] & Traverse[IStream] =
new MonadPlus[IStream] with IsEmpty[IStream] with Traverse[IStream] {

override def map[A, B](fa: IStream[A])(f: A => B): IStream[B] =
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/Id.scala
Expand Up @@ -15,7 +15,7 @@ trait IdInstances {
// TODO Review!
type Identity[X] = Need[X]

val id: Traverse1[Id] with Monad[Id] with BindRec[Id] with Comonad[Id] with Distributive[Id] with Zip[Id] with Unzip[Id] with Align[Id] with Cozip[Id] with Optional[Id] =
val id: Traverse1[Id] & Monad[Id] & BindRec[Id] & Comonad[Id] & Distributive[Id] & Zip[Id] & Unzip[Id] & Align[Id] & Cozip[Id] & Optional[Id] =
new Traverse1[Id] with Monad[Id] with BindRec[Id] with Comonad[Id] with Distributive[Id] with Zip[Id] with Unzip[Id] with Align[Id] with Cozip[Id] with Optional[Id] {
def point[A](a: => A): A = a

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/ImmutableArray.scala
Expand Up @@ -33,7 +33,7 @@ sealed abstract class ImmutableArrayInstances {
(a.length == b.length) && (0 until a.length).forall(i => A.equal(a(i), b(i)))
}

implicit val immutableArrayInstance: Foldable[ImmutableArray] with Zip[ImmutableArray] =
implicit val immutableArrayInstance: Foldable[ImmutableArray] & Zip[ImmutableArray] =
new Foldable[ImmutableArray] with Zip[ImmutableArray] {
override def foldLeft[A, B](fa: ImmutableArray[A], z: B)(f: (B, A) => B) =
fa.foldLeft(z)(f)
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/IndexedContsT.scala
Expand Up @@ -142,7 +142,7 @@ abstract class IndexedContsTInstances extends IndexedContsTInstances0 {
implicit val M: Functor[M] = M0
}

implicit def ContsTMonadPlusAlt[W[_], R, M[_]](implicit W0: Comonad[W], M0: PlusEmpty[M]): MonadPlus[ContsT[W, R, M, *]] with Alt[ContsT[W, R, M, *]] =
implicit def ContsTMonadPlusAlt[W[_], R, M[_]](implicit W0: Comonad[W], M0: PlusEmpty[M]): MonadPlus[ContsT[W, R, M, *]] & Alt[ContsT[W, R, M, *]] =
new ContsTMonadPlus[W, M, R] with Alt[ContsT[W, R, M, *]] {
implicit val W: Comonad[W] = W0
implicit val M: PlusEmpty[M] = M0
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/Isomorphism.scala
Expand Up @@ -186,7 +186,7 @@ object Isomorphism extends Isomorphisms
import Isomorphism._

trait IsomorphismAssociative[F[_, _], G[_, _]] extends Associative[F] {
implicit def G: Associative[G] with Bifunctor[G] // TODO: is this needed? (I think so)
implicit def G: Associative[G] & Bifunctor[G] // TODO: is this needed? (I think so)

def iso: F <~~> G

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/Kleisli.scala
Expand Up @@ -243,7 +243,7 @@ sealed abstract class KleisliInstances0 extends KleisliInstances1 {
}

abstract class KleisliInstances extends KleisliInstances0 {
implicit def kleisliArrow[F[_]](implicit F0: Monad[F]): Arrow[Kleisli[F, *, *]] with Choice[Kleisli[F, *, *]] =
implicit def kleisliArrow[F[_]](implicit F0: Monad[F]): Arrow[Kleisli[F, *, *]] & Choice[Kleisli[F, *, *]] =
new KleisliArrow[F] {
override def F: Monad[F] = F0
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/LazyEither.scala
Expand Up @@ -162,7 +162,7 @@ object LazyEither extends LazyEitherInstances {

// TODO more instances
sealed abstract class LazyEitherInstances {
implicit def lazyEitherInstance[E]: Traverse[LazyEither[E, *]] with Monad[LazyEither[E, *]] with Alt[LazyEither[E, *]] with BindRec[LazyEither[E, *]] with Cozip[LazyEither[E, *]] with Optional[LazyEither[E, *]] with MonadError[LazyEither[E, *], E] =
implicit def lazyEitherInstance[E]: Traverse[LazyEither[E, *]] & Monad[LazyEither[E, *]] & Alt[LazyEither[E, *]] & BindRec[LazyEither[E, *]] & Cozip[LazyEither[E, *]] & Optional[LazyEither[E, *]] & MonadError[LazyEither[E, *], E] =
new Traverse[LazyEither[E, *]] with Monad[LazyEither[E, *]] with Alt[LazyEither[E, *]] with BindRec[LazyEither[E, *]] with Cozip[LazyEither[E, *]] with Optional[LazyEither[E, *]] with MonadError[LazyEither[E, *], E] {

def traverseImpl[G[_]: Applicative, A, B](fa: LazyEither[E, A])(f: A => G[B]): G[LazyEither[E, B]] =
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/LazyOption.scala
Expand Up @@ -115,7 +115,7 @@ sealed abstract class LazyOptionInstances {
implicit val lazyOptionIsCovariant: IsCovariant[LazyOption] =
IsCovariant.force[LazyOption]

implicit val lazyOptionInstance: Traverse[LazyOption] with MonadPlus[LazyOption] with Alt[LazyOption] with BindRec[LazyOption] with Cozip[LazyOption] with Zip[LazyOption] with Unzip[LazyOption] with Align[LazyOption] with Cobind[LazyOption] with Optional[LazyOption] with IsEmpty[LazyOption] =
implicit val lazyOptionInstance: Traverse[LazyOption] & MonadPlus[LazyOption] & Alt[LazyOption] & BindRec[LazyOption] & Cozip[LazyOption] & Zip[LazyOption] & Unzip[LazyOption] & Align[LazyOption] & Cobind[LazyOption] & Optional[LazyOption] & IsEmpty[LazyOption] =
new Traverse[LazyOption] with MonadPlus[LazyOption] with Alt[LazyOption] with BindRec[LazyOption] with Cozip[LazyOption] with Zip[LazyOption] with Unzip[LazyOption] with Align[LazyOption] with Cobind[LazyOption] with Optional[LazyOption] with IsEmpty[LazyOption] {
def cobind[A, B](fa: LazyOption[A])(f: LazyOption[A] => B): LazyOption[B] = map(cojoin(fa))(f)
override def cojoin[A](a: LazyOption[A]) = a match {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/LazyOptionT.scala
Expand Up @@ -81,7 +81,7 @@ sealed abstract class LazyOptionTInstances0 extends LazyOptionTInstances1 {
implicit def lazyOptionEqual[F[_], A](implicit FA: Equal[F[LazyOption[A]]]): Equal[LazyOptionT[F, A]] =
Equal.equalBy((_: LazyOptionT[F, A]).run)

implicit def lazyOptionTMonadPlusAlt[F[_]](implicit F0: Monad[F]): MonadPlus[LazyOptionT[F, *]] with Alt[LazyOptionT[F, *]] =
implicit def lazyOptionTMonadPlusAlt[F[_]](implicit F0: Monad[F]): MonadPlus[LazyOptionT[F, *]] & Alt[LazyOptionT[F, *]] =
new LazyOptionTMonad[F] with Alt[LazyOptionT[F, *]] {
implicit def F: Monad[F] = F0

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/ListT.scala
Expand Up @@ -102,7 +102,7 @@ sealed abstract class ListTInstances1 extends ListTInstances2 {
}

sealed abstract class ListTInstances extends ListTInstances1 {
implicit def listTMonadPlus[F[_]](implicit F0: Monad[F]): MonadPlus[ListT[F, *]] with Alt[ListT[F, *]] =
implicit def listTMonadPlus[F[_]](implicit F0: Monad[F]): MonadPlus[ListT[F, *]] & Alt[ListT[F, *]] =
new ListTMonadPlus[F] with Alt[ListT[F, *]] {
implicit def F: Monad[F] = F0

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/scalaz/Map.scala
Expand Up @@ -1023,7 +1023,7 @@ sealed abstract class MapInstances1 extends MapInstances2 {

sealed abstract class MapInstances0 extends MapInstances1 {

implicit def scalazMapInstance[S: Order]: Bind[==>>[S, *]] with Align[==>>[S, *]] with Zip[==>>[S, *]] =
implicit def scalazMapInstance[S: Order]: Bind[==>>[S, *]] & Align[==>>[S, *]] & Zip[==>>[S, *]] =
new Bind[==>>[S, *]] with Align[==>>[S, *]] with Zip[==>>[S, *]] {
override def map[A, B](fa: S ==>> A)(f: A => B) =
fa map f
Expand Down

0 comments on commit 06a42f1

Please sign in to comment.