-
-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Labels
Description
"org.typelevel" %% "kittens" % "3.3.0"import cats.derived._
case class MyString(value: String) extends AnyVal
semiauto.monoid[MyString]this snippet compiles successfully on Scala 2.13, but fails on Scala 3:
No given instance of type cats.derived.DerivedMonoid[Playground.MyString] was found.
I found:
cats.derived.DerivedMonoid.given_DerivedMonoid_A[Playground.MyString](
shapeless3.deriving.K0.mkProductInstances[
[A] =>> cats.derived.Derived.Or[cats.kernel.Monoid[A]], Playground.MyString]
(
/* missing */
summon[shapeless3.deriving.K0.ProductGeneric[Playground.MyString]]
)
)
But Failed to synthesize an instance of type shapeless3.deriving.K0.ProductGeneric[Playground.MyString]: class MyString is not a generic product because it is a value class.
The following import might make progress towards fixing the problem:
import cats.derived.DerivedMonoid.Strict.product
Scastie: https://scastie.scala-lang.org/DqVORi3bSU6rB8JM0PupHw
joroKr21