Skip to content

Commit

Permalink
Switch priority of MonadError instances for IorT
Browse files Browse the repository at this point in the history
  • Loading branch information
frroliveira committed Nov 20, 2017
1 parent 86a3339 commit 5be9cb1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions core/src/main/scala/cats/data/IorT.scala
Original file line number Diff line number Diff line change
Expand Up @@ -406,18 +406,18 @@ private[data] abstract class IorTInstances1 extends IorTInstances2 {
implicit def catsDataFoldableForIorT[F[_], A](implicit F: Foldable[F]): Foldable[IorT[F, A, ?]] =
new IorTFoldable[F, A] { val F0: Foldable[F] = F }

implicit def catsDataMonadErrorFForIorT[F[_], A, E](implicit FE: MonadError[F, E], A: Semigroup[A]): MonadError[IorT[F, A, ?], E] =
new IorTMonadErrorF[F, A, E] {
implicit def catsDataMonadErrorForIorT[F[_], A](implicit F: Monad[F], A: Semigroup[A]): MonadError[IorT[F, A, ?], A] =
new IorTMonadError[F, A] {
val A0: Semigroup[A] = A
val F0: MonadError[F, E] = FE
val F0: Monad[F] = F
}
}

private[data] abstract class IorTInstances2 extends IorTInstances3 {
implicit def catsDataMonadErrorForIorT[F[_], A](implicit F: Monad[F], A: Semigroup[A]): MonadError[IorT[F, A, ?], A] =
new IorTMonadError[F, A] {
implicit def catsDataMonadErrorFForIorT[F[_], A, E](implicit FE: MonadError[F, E], A: Semigroup[A]): MonadError[IorT[F, A, ?], E] =
new IorTMonadErrorF[F, A, E] {
val A0: Semigroup[A] = A
val F0: Monad[F] = F
val F0: MonadError[F, E] = FE
}

implicit def catsDataEqForIorT[F[_], A, B](implicit F: Eq[F[Ior[A, B]]]): Eq[IorT[F, A, B]] =
Expand Down

0 comments on commit 5be9cb1

Please sign in to comment.