From a6f0a5c149c613b94ef3cdcbcda5956b8a8deaba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C5=A0pan=C4=9Bl?= Date: Tue, 23 Jan 2024 16:25:30 +0100 Subject: [PATCH] Fix: use contravariance to allow derived index type --- .../src/main/scala-3/com/softwaremill/quicklens/package.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quicklens/src/main/scala-3/com/softwaremill/quicklens/package.scala b/quicklens/src/main/scala-3/com/softwaremill/quicklens/package.scala index 54d5b20..a5c1f9f 100644 --- a/quicklens/src/main/scala-3/com/softwaremill/quicklens/package.scala +++ b/quicklens/src/main/scala-3/com/softwaremill/quicklens/package.scala @@ -161,7 +161,7 @@ package object quicklens { } } - trait QuicklensIndexedFunctor[F[_], I] { + trait QuicklensIndexedFunctor[F[_], -I] { def at[A](fa: F[A], f: A => A, idx: I): F[A] def atOrElse[A](fa: F[A], f: A => A, idx: I, default: => A): F[A] def index[A](fa: F[A], f: A => A, idx: I): F[A]