Skip to content

Commit

Permalink
rollback bin-compat hack
Browse files Browse the repository at this point in the history
  • Loading branch information
satorg committed Oct 18, 2022
1 parent 9e6fb7b commit e2d015c
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions core/src/main/scala/cats/data/IndexedReaderWriterStateT.scala
Original file line number Diff line number Diff line change
Expand Up @@ -844,26 +844,26 @@ private trait RWSTNonEmptyAlternative1[F[_], E, L, S]
def G: NonEmptyAlternative[F]
implicit def L: Monoid[L]

// Enforces binary compatibility for RWSTAlternative1 between 2.6.1 and newer versions.
final protected def pure0[A](a: A): ReaderWriterStateT[F, E, L, S, A] =
// [REVERTED] Enforces binary compatibility for RWSTAlternative1 between 2.6.1 and newer versions.
def pure[A](a: A): ReaderWriterStateT[F, E, L, S, A] =
ReaderWriterStateT.pure[F, E, L, S, A](a)

// Enforces binary compatibility for RWSTAlternative1 between 2.6.1 and newer versions.
final protected def ap0[A, B](
// [REVERTED] Enforces binary compatibility for RWSTAlternative1 between 2.6.1 and newer versions.
def ap[A, B](
ff: ReaderWriterStateT[F, E, L, S, A => B]
)(
fa: ReaderWriterStateT[F, E, L, S, A]
): ReaderWriterStateT[F, E, L, S, B] =
ff.flatMap(f => fa.map(f)(F))(F, L)

def pure[A](a: A): ReaderWriterStateT[F, E, L, S, A] = pure0(a)
// def pure[A](a: A): ReaderWriterStateT[F, E, L, S, A] = pure0(a)

def ap[A, B](
ff: ReaderWriterStateT[F, E, L, S, A => B]
)(
fa: ReaderWriterStateT[F, E, L, S, A]
): ReaderWriterStateT[F, E, L, S, B] =
ap0(ff)(fa)
// def ap[A, B](
// ff: ReaderWriterStateT[F, E, L, S, A => B]
// )(
// fa: ReaderWriterStateT[F, E, L, S, A]
// ): ReaderWriterStateT[F, E, L, S, B] =
// ap0(ff)(fa)

override def prependK[A](
a: A,
Expand Down Expand Up @@ -894,13 +894,13 @@ private trait RWSTAlternative1[F[_], E, L, S]

// Must exist in this trait for binary compatibility.
override def pure[A](a: A): ReaderWriterStateT[F, E, L, S, A] =
pure0(a)
super.pure(a)

// Must exist in this trait for binary compatibility.
override def ap[A, B](
ff: ReaderWriterStateT[F, E, L, S, A => B]
)(
fa: ReaderWriterStateT[F, E, L, S, A]
): ReaderWriterStateT[F, E, L, S, B] =
ap0(ff)(fa)
super.ap(ff)(fa)
}

0 comments on commit e2d015c

Please sign in to comment.