Skip to content

Commit

Permalink
Avoid unusual kind-projector syntax (#3186)
Browse files Browse the repository at this point in the history
* Avoid unusual kind-projector syntax

* Avoid *[_] in test
  • Loading branch information
travisbrown authored and LukaJCB committed Dec 10, 2019
1 parent 4f8768f commit 2d7298c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions core/src/main/scala/cats/data/Nested.scala
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,12 @@ sealed abstract private[data] class NestedInstances3 extends NestedInstances4 {
}

sealed abstract private[data] class NestedInstances4 extends NestedInstances5 {
implicit def catsDataApplicativeErrorForNested[F[_]: ApplicativeError[*[_], E], G[_]: Applicative, E]
: ApplicativeError[Nested[F, G, *], E] =
implicit def catsDataApplicativeErrorForNested[F[_], G[_], E](
implicit F: ApplicativeError[F, E],
G0: Applicative[G]
): ApplicativeError[Nested[F, G, *], E] =
new NestedApplicativeError[F, G, E] {
val G: Applicative[G] = Applicative[G]
val G: Applicative[G] = G0

val AEF: ApplicativeError[F, E] = ApplicativeError[F, E]
}
Expand Down
2 changes: 1 addition & 1 deletion tests/src/test/scala/cats/tests/OptionTSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class OptionTSuite extends CatsSuite {

test("MonadError[OptionT[F, *], E] instance has higher priority than MonadError[OptionT[F, *], Unit]") {

def shouldCompile[F[_]: MonadError[*[_], E], E](x: OptionT[F, Int], e: E): OptionT[F, Int] =
def shouldCompile[F[_], E](x: OptionT[F, Int], e: E)(implicit F: MonadError[F, E]): OptionT[F, Int] =
x.ensure(e)(_ => true)
}

Expand Down

0 comments on commit 2d7298c

Please sign in to comment.