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

Avoid unusual kind-projector syntax #3186

Merged
merged 2 commits into from
Dec 10, 2019
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
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