diff --git a/core/src/main/scala-2/cats/derived/applicative.scala b/core/src/main/scala-2/cats/derived/applicative.scala index ec1dc371..1592087e 100644 --- a/core/src/main/scala-2/cats/derived/applicative.scala +++ b/core/src/main/scala-2/cats/derived/applicative.scala @@ -23,13 +23,11 @@ import shapeless.labelled._ import scala.annotation.implicitNotFound -@implicitNotFound("""Could not derive an instance of Applicative[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type λ[x => T] where T: Monoid - * it is a nested type λ[x => G[H[x]]] where G: Applicative and H: Applicative - * it is a generic case class where all fields have an Applicative instance - -Note: using kind-projector notation - https://github.com/typelevel/kind-projector""") +@implicitNotFound("""Could not derive Applicative for ${F}. +Make sure it satisfies one of the following conditions: + * constant type λ[x => T] where T: Monoid + * nested type λ[x => G[H[x]]] where G: Applicative and H: Applicative + * generic case class where all fields form Applicative""") trait MkApplicative[F[_]] extends Applicative[F] object MkApplicative extends MkApplicativeDerivation { diff --git a/core/src/main/scala-2/cats/derived/apply.scala b/core/src/main/scala-2/cats/derived/apply.scala index 24df6aab..9beef075 100644 --- a/core/src/main/scala-2/cats/derived/apply.scala +++ b/core/src/main/scala-2/cats/derived/apply.scala @@ -23,13 +23,11 @@ import shapeless.labelled._ import scala.annotation.implicitNotFound -@implicitNotFound("""Could not derive an instance of Apply[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type λ[x => T] where T: Semigroup - * it is a nested type λ[x => G[H[x]]] where G: Apply and H: Apply - * it is a generic case class where all fields have an Apply instance - -Note: using kind-projector notation - https://github.com/typelevel/kind-projector""") +@implicitNotFound("""Could not derive Apply for ${F}. +Make sure it satisfies one of the following conditions: + * constant type λ[x => T] where T: Semigroup + * nested type λ[x => G[H[x]]] where G: Apply and H: Apply + * generic case class where all fields form Apply""") trait MkApply[F[_]] extends Apply[F] object MkApply extends MkApplyDerivation { diff --git a/core/src/main/scala-2/cats/derived/commutativeMonoid.scala b/core/src/main/scala-2/cats/derived/commutativeMonoid.scala index ce7f6c81..5a33475b 100644 --- a/core/src/main/scala-2/cats/derived/commutativeMonoid.scala +++ b/core/src/main/scala-2/cats/derived/commutativeMonoid.scala @@ -22,8 +22,8 @@ import util.VersionSpecific.{OrElse, Lazy} import scala.annotation.implicitNotFound -@implicitNotFound("""Could not derive an instance of CommutativeMonoid[A] where A = ${A}. -Make sure that A is a case class where all fields have a CommutativeMonoid instance.""") +@implicitNotFound("""Could not derive CommutativeMonoid for ${A}. +Make sure it is a case class where all fields form CommutativeMonoid.""") trait MkCommutativeMonoid[A] extends CommutativeMonoid[A] object MkCommutativeMonoid extends MkCommutativeMonoidDerivation { diff --git a/core/src/main/scala-2/cats/derived/commutativeSemigroup.scala b/core/src/main/scala-2/cats/derived/commutativeSemigroup.scala index 569f9be9..bb1ce2df 100644 --- a/core/src/main/scala-2/cats/derived/commutativeSemigroup.scala +++ b/core/src/main/scala-2/cats/derived/commutativeSemigroup.scala @@ -22,8 +22,8 @@ import util.VersionSpecific.{OrElse, Lazy} import scala.annotation.implicitNotFound -@implicitNotFound("""Could not derive an instance of CommutativeSemigroup[A] where A = ${A}. -Make sure that A is a case class where all fields have a CommutativeSemigroup instance.""") +@implicitNotFound("""Could not derive CommutativeSemigroup for ${A}. +Make sure it is a case class where all fields form CommutativeSemigroup.""") trait MkCommutativeSemigroup[A] extends CommutativeSemigroup[A] object MkCommutativeSemigroup extends MkCommutativeSemigroupDerivation { diff --git a/core/src/main/scala-2/cats/derived/consk.scala b/core/src/main/scala-2/cats/derived/consk.scala index f1431a3f..b423753d 100644 --- a/core/src/main/scala-2/cats/derived/consk.scala +++ b/core/src/main/scala-2/cats/derived/consk.scala @@ -21,7 +21,7 @@ import shapeless._ import scala.annotation.implicitNotFound -@implicitNotFound("Could not derive an instance of ConsK[${F}]") +@implicitNotFound("Could not derive ConsK for ${F}") trait MkConsK[F[_], G[_]] extends Serializable { def cons[A](head: A, tail: G[A]): F[A] } diff --git a/core/src/main/scala-2/cats/derived/contravariant.scala b/core/src/main/scala-2/cats/derived/contravariant.scala index cfde25f0..a337f56d 100644 --- a/core/src/main/scala-2/cats/derived/contravariant.scala +++ b/core/src/main/scala-2/cats/derived/contravariant.scala @@ -22,14 +22,12 @@ import util.VersionSpecific.OrElse import scala.annotation.implicitNotFound -@implicitNotFound("""Could not derive an instance of Contravariant[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type λ[x => T] - * it is a nested type λ[x => G[H[x]]] where G: Functor and H: Contravariant - * it is a generic case class where all fields have a Contravariant instance - * it is a generic sealed trait where all subclasses have a Contravariant instance - -Note: using kind-projector notation - https://github.com/typelevel/kind-projector""") +@implicitNotFound("""Could not derive Contravariant for ${F}. +Make sure it satisfies one of the following conditions: + * constant type λ[x => T] + * nested type λ[x => G[H[x]]] where G: Functor and H: Contravariant + * generic case class where all fields form Contravariant + * generic sealed trait where all subclasses form Contravariant""") trait MkContravariant[F[_]] extends Contravariant[F] { def safeContramap[A, B](fa: F[A])(f: B => Eval[A]): Eval[F[B]] def contramap[A, B](fa: F[A])(f: B => A): F[B] = safeContramap(fa)((b: B) => Eval.later(f(b))).value diff --git a/core/src/main/scala-2/cats/derived/empty.scala b/core/src/main/scala-2/cats/derived/empty.scala index 32245d85..2ffabd60 100644 --- a/core/src/main/scala-2/cats/derived/empty.scala +++ b/core/src/main/scala-2/cats/derived/empty.scala @@ -23,10 +23,10 @@ import util.VersionSpecific.{OrElse, Lazy} import scala.annotation.implicitNotFound -@implicitNotFound("""Could not derive an instance of Empty[A] where A = ${A}. -Make sure that A satisfies one of the following conditions: - * it is a case class where all fields have an Empty instance - * it is a sealed trait where exactly one subclass has an Empty instance""") +@implicitNotFound("""Could not derive Empty for ${A}. +Make sure it satisfies one of the following conditions: + * case class where all fields form Empty + * sealed trait where exactly one subclass forms Empty""") trait MkEmpty[A] extends Empty[A] object MkEmpty extends MkEmptyDerivation { diff --git a/core/src/main/scala-2/cats/derived/emptyk.scala b/core/src/main/scala-2/cats/derived/emptyk.scala index 5a8d7c01..f78064d2 100644 --- a/core/src/main/scala-2/cats/derived/emptyk.scala +++ b/core/src/main/scala-2/cats/derived/emptyk.scala @@ -22,14 +22,12 @@ import util.VersionSpecific.OrElse import scala.annotation.implicitNotFound -@implicitNotFound("""Could not derive an instance of EmptyK[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type λ[x => T] where T: Empty - * it is a nested type λ[x => G[H[x]]] where G: EmptyK - * it is a nested type λ[x => G[H[x]]] where G: Pure and H: EmptyK - * it is a generic case class where all fields have an EmptyK instance - -Note: using kind-projector notation - https://github.com/typelevel/kind-projector""") +@implicitNotFound("""Could not derive EmptyK for ${F}. +Make sure it satisfies one of the following conditions: + * constant type λ[x => T] where T: Empty + * nested type λ[x => G[H[x]]] where G: EmptyK + * nested type λ[x => G[H[x]]] where G: Pure and H: EmptyK + * generic case class where all fields form EmptyK""") trait MkEmptyK[F[_]] extends EmptyK[F] object MkEmptyK extends MkEmptyKDerivation { diff --git a/core/src/main/scala-2/cats/derived/eq.scala b/core/src/main/scala-2/cats/derived/eq.scala index e1de6aab..c3e90f3f 100644 --- a/core/src/main/scala-2/cats/derived/eq.scala +++ b/core/src/main/scala-2/cats/derived/eq.scala @@ -22,10 +22,10 @@ import shapeless._ import scala.annotation.implicitNotFound -@implicitNotFound("""Could not derive an instance of Eq[A] where A = ${A}. -Make sure that A satisfies one of the following conditions: - * it is a case class where all fields have an Eq instance - * it is a sealed trait where all subclasses have an Eq instance""") +@implicitNotFound("""Could not derive Eq for ${A}. +Make sure it satisfies one of the following conditions: + * case class where all fields form Eq + * sealed trait where all subclasses form Eq""") trait MkEq[A] extends Eq[A] object MkEq extends MkEqDerivation { diff --git a/core/src/main/scala-2/cats/derived/foldable.scala b/core/src/main/scala-2/cats/derived/foldable.scala index 2d06b6d3..6bd5ee8c 100644 --- a/core/src/main/scala-2/cats/derived/foldable.scala +++ b/core/src/main/scala-2/cats/derived/foldable.scala @@ -22,14 +22,12 @@ import util.VersionSpecific.OrElse import scala.annotation.implicitNotFound -@implicitNotFound("""Could not derive an instance of Foldable[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type λ[x => T] - * it is a nested type λ[x => G[H[x]]] where G: Foldable and H: Foldable - * it is a generic case class where all fields have a Foldable instance - * it is a generic sealed trait where all subclasses have a Foldable instance - -Note: using kind-projector notation - https://github.com/typelevel/kind-projector""") +@implicitNotFound("""Could not derive Foldable for ${F}. +Make sure it satisfies one of the following conditions: + * constant type λ[x => T] + * nested type λ[x => G[H[x]]] where G: Foldable and H: Foldable + * generic case class where all fields form Foldable + * generic sealed trait where all subclasses form Foldable""") trait MkFoldable[F[_]] extends Foldable[F] { def foldRight[A, B](fa: F[A], lb: Eval[B])(f: (A, Eval[B]) => Eval[B]): Eval[B] def safeFoldLeft[A, B](fa: F[A], b: B)(f: (B, A) => Eval[B]): Eval[B] diff --git a/core/src/main/scala-2/cats/derived/functor.scala b/core/src/main/scala-2/cats/derived/functor.scala index e222c545..c33de639 100644 --- a/core/src/main/scala-2/cats/derived/functor.scala +++ b/core/src/main/scala-2/cats/derived/functor.scala @@ -23,15 +23,13 @@ import util.VersionSpecific.OrElse import scala.annotation.implicitNotFound -@implicitNotFound("""Could not derive an instance of Functor[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type λ[x => T] - * it is a nested type λ[x => G[H[x]]] where G: Functor and H: Functor - * it is a nested type λ[x => G[H[x]]] where G: Contravariant and H: Contravariant - * it is a generic case class where all fields have a Functor instance - * it is a generic sealed trait where all subclasses have a Functor instance - -Note: using kind-projector notation - https://github.com/typelevel/kind-projector""") +@implicitNotFound("""Could not derive Functor for ${F}. +Make sure it satisfies one of the following conditions: + * constant type λ[x => T] + * nested type λ[x => G[H[x]]] where G: Functor and H: Functor + * nested type λ[x => G[H[x]]] where G: Contravariant and H: Contravariant + * generic case class where all fields form Functor + * generic sealed trait where all subclasses form Functor""") trait MkFunctor[F[_]] extends Functor[F] { def safeMap[A, B](fa: F[A])(f: A => Eval[B]): Eval[F[B]] diff --git a/core/src/main/scala-2/cats/derived/hash.scala b/core/src/main/scala-2/cats/derived/hash.scala index 6c0ccda6..2c7f8ad0 100644 --- a/core/src/main/scala-2/cats/derived/hash.scala +++ b/core/src/main/scala-2/cats/derived/hash.scala @@ -4,10 +4,10 @@ package derived import scala.annotation._ import scala.util.hashing.MurmurHash3 -@implicitNotFound("""Could not derive an instance of Hash[A] where A = ${A}. -Make sure that A satisfies one of the following conditions: - * it is a case class where all fields have a Hash instance - * it is a sealed trait where all subclasses have a Hash instance""") +@implicitNotFound("""Could not derive Hash for ${A}. +Make sure it satisfies one of the following conditions: + * case class where all fields form Hash + * sealed trait where all subclasses form Hash""") trait MkHash[A] extends Hash[A] object MkHash extends MkHashDerivation { diff --git a/core/src/main/scala-2/cats/derived/invariant.scala b/core/src/main/scala-2/cats/derived/invariant.scala index 3ab5839a..05502d2f 100644 --- a/core/src/main/scala-2/cats/derived/invariant.scala +++ b/core/src/main/scala-2/cats/derived/invariant.scala @@ -22,14 +22,12 @@ import util.VersionSpecific.OrElse import scala.annotation.implicitNotFound -@implicitNotFound("""Could not derive an instance of Invariant[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type λ[x => T] - * it is a nested type λ[x => G[H[x]]] where G: Invariant and H: Invariant - * it is a generic case class where all fields have an Invariant instance - * it is a generic sealed trait where all subclasses have an Invariant instance - -Note: using kind-projector notation - https://github.com/typelevel/kind-projector""") +@implicitNotFound("""Could not derive Invariant for ${F}. +Make sure it satisfies one of the following conditions: + * constant type λ[x => T] + * nested type λ[x => G[H[x]]] where G: Invariant and H: Invariant + * generic case class where all fields form Invariant + * generic sealed trait where all subclasses form Invariant""") trait MkInvariant[F[_]] extends Invariant[F] { def safeImap[A, B](fa: F[A])(g: A => Eval[B])(f: B => Eval[A]): Eval[F[B]] def imap[A, B](fa: F[A])(g: A => B)(f: B => A): F[B] = diff --git a/core/src/main/scala-2/cats/derived/monoid.scala b/core/src/main/scala-2/cats/derived/monoid.scala index c412c402..6e11aef7 100644 --- a/core/src/main/scala-2/cats/derived/monoid.scala +++ b/core/src/main/scala-2/cats/derived/monoid.scala @@ -22,8 +22,8 @@ import util.VersionSpecific.{OrElse, Lazy} import scala.annotation.implicitNotFound -@implicitNotFound("""Could not derive an instance of Monoid[A] where A = ${A}. -Make sure that A is a case class where all fields have a Monoid instance.""") +@implicitNotFound("""Could not derive Monoid for ${A}. +Make sure it is a case class where all fields form Monoid.""") trait MkMonoid[A] extends Monoid[A] object MkMonoid extends MkMonoidDerivation { diff --git a/core/src/main/scala-2/cats/derived/monoidk.scala b/core/src/main/scala-2/cats/derived/monoidk.scala index 2b9024ed..fc97a4ca 100644 --- a/core/src/main/scala-2/cats/derived/monoidk.scala +++ b/core/src/main/scala-2/cats/derived/monoidk.scala @@ -22,14 +22,12 @@ import util.VersionSpecific.OrElse import scala.annotation.implicitNotFound -@implicitNotFound("""Could not derive an instance of MonoidK[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type λ[x => T] where T: Monoid - * it is a nested type λ[x => G[H[x]]] where G: MonoidK - * it is a nested type λ[x => G[H[x]]] where G: Applicative and H: MonoidK - * it is a generic case class where all fields have a MonoidK instance - -Note: using kind-projector notation - https://github.com/typelevel/kind-projector""") +@implicitNotFound("""Could not derive MonoidK for ${F}. +Make sure it satisfies one of the following conditions: + * constant type λ[x => T] where T: Monoid + * nested type λ[x => G[H[x]]] where G: MonoidK + * nested type λ[x => G[H[x]]] where G: Applicative and H: MonoidK + * generic case class where all fields form MonoidK""") trait MkMonoidK[F[_]] extends MonoidK[F] object MkMonoidK extends MkMonoidKDerivation { diff --git a/core/src/main/scala-2/cats/derived/nonEmptyTraverse.scala b/core/src/main/scala-2/cats/derived/nonEmptyTraverse.scala index 0af9300e..62efc0ba 100644 --- a/core/src/main/scala-2/cats/derived/nonEmptyTraverse.scala +++ b/core/src/main/scala-2/cats/derived/nonEmptyTraverse.scala @@ -22,13 +22,11 @@ import util.VersionSpecific.OrElse import scala.annotation.implicitNotFound -@implicitNotFound("""Could not derive an instance of NonEmptyTraverse[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a nested type λ[x => G[H[x]]] where G: NonEmptyTraverse and H: NonEmptyTraverse - * it is a generic case class where at least one field has a NonEmptyTraverse and the rest Traverse instances - * it is a generic sealed trait where all subclasses have a NonEmptyTraverse instance - -Note: using kind-projector notation - https://github.com/typelevel/kind-projector""") +@implicitNotFound("""Could not derive NonEmptyTraverse for ${F}. +Make sure it satisfies one of the following conditions: + * nested type λ[x => G[H[x]]] where G: NonEmptyTraverse and H: NonEmptyTraverse + * generic case class where at least one field forms NonEmptyTraverse and the rest form Traverse + * generic sealed trait where all subclasses form NonEmptyTraverse""") trait MkNonEmptyTraverse[F[_]] extends NonEmptyTraverse[F] with MkTraverse[F] with MkReducible[F] { def safeNonEmptyTraverse[G[_]: Apply, A, B](fa: F[A])(f: A => Eval[G[B]]): Eval[G[F[B]]] diff --git a/core/src/main/scala-2/cats/derived/order.scala b/core/src/main/scala-2/cats/derived/order.scala index bd2138e0..aac7c679 100644 --- a/core/src/main/scala-2/cats/derived/order.scala +++ b/core/src/main/scala-2/cats/derived/order.scala @@ -22,10 +22,10 @@ import shapeless._ import scala.annotation.implicitNotFound -@implicitNotFound("""Could not derive an instance of Order[A] where A = ${A}. -Make sure that A satisfies one of the following conditions: - * it is a case class where all fields have an Order instance - * it is a sealed trait with exactly one subclass that has an Order instance""") +@implicitNotFound("""Could not derive Order for ${A}. +Make sure it satisfies one of the following conditions: + * case class where all fields form Order + * sealed trait with exactly one subclass that forms Order""") trait MkOrder[A] extends Order[A] object MkOrder extends MkOrderDerivation { diff --git a/core/src/main/scala-2/cats/derived/partialOrder.scala b/core/src/main/scala-2/cats/derived/partialOrder.scala index ad2fe194..e274ddcd 100644 --- a/core/src/main/scala-2/cats/derived/partialOrder.scala +++ b/core/src/main/scala-2/cats/derived/partialOrder.scala @@ -22,10 +22,10 @@ import shapeless._ import scala.annotation.implicitNotFound -@implicitNotFound("""Could not derive an instance of PartialOrder[A] where A = ${A}. -Make sure that A satisfies one of the following conditions: - * it is a case class where all fields have a PartialOrder instance - * it is a sealed trait where all subclasses have a PartialOrder instance""") +@implicitNotFound("""Could not derive PartialOrder for ${A}. +Make sure it satisfies one of the following conditions: + * case class where all fields form PartialOrder + * sealed trait where all subclasses form PartialOrder""") trait MkPartialOrder[A] extends PartialOrder[A] object MkPartialOrder extends MkPartialOrderDerivation { diff --git a/core/src/main/scala-2/cats/derived/pure.scala b/core/src/main/scala-2/cats/derived/pure.scala index cd01ec09..155889df 100644 --- a/core/src/main/scala-2/cats/derived/pure.scala +++ b/core/src/main/scala-2/cats/derived/pure.scala @@ -22,13 +22,11 @@ import shapeless._ import scala.annotation.implicitNotFound -@implicitNotFound("""Could not derive an instance of Pure[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type λ[x => T] where T: Empty - * it is a nested type λ[x => G[H[x]]] where G: Pure and H: Pure - * it is a generic case class where all fields have a Pure instance - -Note: using kind-projector notation - https://github.com/typelevel/kind-projector""") +@implicitNotFound("""Could not derive Pure for ${F}. +Make sure it satisfies one of the following conditions: + * constant type λ[x => T] where T: Empty + * nested type λ[x => G[H[x]]] where G: Pure and H: Pure + * generic case class where all fields form Pure""") trait MkPure[F[_]] extends Pure[F] object MkPure extends MkPureDerivation { diff --git a/core/src/main/scala-2/cats/derived/reducible.scala b/core/src/main/scala-2/cats/derived/reducible.scala index 07a29aa6..5230260c 100644 --- a/core/src/main/scala-2/cats/derived/reducible.scala +++ b/core/src/main/scala-2/cats/derived/reducible.scala @@ -22,13 +22,11 @@ import util.VersionSpecific.OrElse import scala.annotation.implicitNotFound -@implicitNotFound("""Could not derive an instance of Reducible[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a nested type λ[x => G[H[x]]] where G: Reducible and H: Reducible - * it is a generic case class where at least one field has a Reducible and the rest Foldable instances - * it is a generic sealed trait where all subclasses have a Reducible instance - -Note: using kind-projector notation - https://github.com/typelevel/kind-projector""") +@implicitNotFound("""Could not derive Reducible for ${F}. +Make sure it satisfies one of the following conditions: + * nested type λ[x => G[H[x]]] where G: Reducible and H: Reducible + * generic case class where at least one field forms Reducible and the rest form Foldable + * generic sealed trait where all subclasses form Reducible""") trait MkReducible[F[_]] extends Reducible[F] with MkFoldable[F] { def safeReduceLeftTo[A, B](fa: F[A])(f: A => B)(g: (B, A) => Eval[B]): Eval[B] diff --git a/core/src/main/scala-2/cats/derived/semigroup.scala b/core/src/main/scala-2/cats/derived/semigroup.scala index 42792a67..cd96872a 100644 --- a/core/src/main/scala-2/cats/derived/semigroup.scala +++ b/core/src/main/scala-2/cats/derived/semigroup.scala @@ -22,8 +22,8 @@ import util.VersionSpecific.{OrElse, Lazy} import scala.annotation.implicitNotFound -@implicitNotFound("""Could not derive an instance of Semigroup[A] where A = ${A}. -Make sure that A is a case class where all fields have a Semigroup instance.""") +@implicitNotFound("""Could not derive Semigroup for ${A}. +Make sure it is a case class where all fields form Semigroup.""") trait MkSemigroup[A] extends Semigroup[A] object MkSemigroup extends MkSemigroupDerivation { diff --git a/core/src/main/scala-2/cats/derived/semigroupk.scala b/core/src/main/scala-2/cats/derived/semigroupk.scala index fb24ac96..fd467e3e 100644 --- a/core/src/main/scala-2/cats/derived/semigroupk.scala +++ b/core/src/main/scala-2/cats/derived/semigroupk.scala @@ -22,14 +22,12 @@ import util.VersionSpecific.OrElse import scala.annotation.implicitNotFound -@implicitNotFound("""Could not derive an instance of SemigroupK[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type λ[x => T] where T: Semigroup - * it is a nested type λ[x => G[H[x]]] where G: SemigroupK - * it is a nested type λ[x => G[H[x]]] where G: Apply and H: SemigroupK - * it is a generic case class where all fields have a SemigroupK instance - -Note: using kind-projector notation - https://github.com/typelevel/kind-projector""") +@implicitNotFound("""Could not derive SemigroupK for ${F}. +Make sure it satisfies one of the following conditions: + * constant type λ[x => T] where T: Semigroup + * nested type λ[x => G[H[x]]] where G: SemigroupK + * nested type λ[x => G[H[x]]] where G: Apply and H: SemigroupK + * generic case class where all fields form SemigroupK""") trait MkSemigroupK[F[_]] extends SemigroupK[F] object MkSemigroupK extends MkSemigroupKDerivation { diff --git a/core/src/main/scala-2/cats/derived/show.scala b/core/src/main/scala-2/cats/derived/show.scala index 3013ebfa..2cc1e406 100644 --- a/core/src/main/scala-2/cats/derived/show.scala +++ b/core/src/main/scala-2/cats/derived/show.scala @@ -16,10 +16,10 @@ import scala.reflect.ClassTag * * See the test suite for more precise examples of what can and cannot be derived. */ -@implicitNotFound("""Could not derive an instance of Show[A] where A = ${A}. -Make sure that A satisfies one of the following conditions: - * it is a case class where all fields have a Show instance - * it is a sealed trait where all subclasses have a Show instance""") +@implicitNotFound("""Could not derive Show for ${A}. +Make sure it satisfies one of the following conditions: + * case class where all fields form Show + * sealed trait where all subclasses form Show""") trait MkShow[A] extends Show[A] object MkShow extends MkShowDerivation { diff --git a/core/src/main/scala-2/cats/derived/showPretty.scala b/core/src/main/scala-2/cats/derived/showPretty.scala index 19e4561d..3d89d803 100644 --- a/core/src/main/scala-2/cats/derived/showPretty.scala +++ b/core/src/main/scala-2/cats/derived/showPretty.scala @@ -18,10 +18,10 @@ object ShowPretty { def apply[A: ShowPretty]: ShowPretty[A] = implicitly } -@implicitNotFound("""Could not derive an instance of ShowPretty[A] where A = ${A}. -Make sure that A satisfies one of the following conditions: - * it is a case class where all fields have a Show instance - * it is a sealed trait where all subclasses have a Show instance""") +@implicitNotFound("""Could not derive ShowPretty for ${A}. +Make sure it satisfies one of the following conditions: + * case class where all fields form Show + * sealed trait where all subclasses form Show""") trait MkShowPretty[A] extends ShowPretty[A] object MkShowPretty extends MkShowPrettyDerivation { diff --git a/core/src/main/scala-2/cats/derived/traverse.scala b/core/src/main/scala-2/cats/derived/traverse.scala index 9d9c00e6..30781770 100644 --- a/core/src/main/scala-2/cats/derived/traverse.scala +++ b/core/src/main/scala-2/cats/derived/traverse.scala @@ -6,14 +6,12 @@ import util.VersionSpecific.OrElse import scala.annotation.implicitNotFound -@implicitNotFound("""Could not derive an instance of Traverse[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type λ[x => T] - * it is a nested type λ[x => G[H[x]]] where G: Traverse and H: Traverse - * it is a generic case class where all fields have a Traverse instance - * it is a generic sealed trait where all subclasses have a Traverse instance - -Note: using kind-projector notation - https://github.com/typelevel/kind-projector""") +@implicitNotFound("""Could not derive Traverse for ${F}. +Make sure it satisfies one of the following conditions: + * constant type λ[x => T] + * nested type λ[x => G[H[x]]] where G: Traverse and H: Traverse + * generic case class where all fields form Traverse + * generic sealed trait where all subclasses form Traverse""") trait MkTraverse[F[_]] extends Traverse[F] with MkFoldable[F] { def safeTraverse[G[_]: Applicative, A, B](fa: F[A])(f: A => Eval[G[B]]): Eval[G[F[B]]] def foldRight[A, B](fa: F[A], lb: Eval[B])(f: (A, Eval[B]) => Eval[B]): Eval[B] diff --git a/core/src/main/scala-3/cats/derived/DerivedAlternative.scala b/core/src/main/scala-3/cats/derived/DerivedAlternative.scala index 9c2ef6b8..aa41223d 100644 --- a/core/src/main/scala-3/cats/derived/DerivedAlternative.scala +++ b/core/src/main/scala-3/cats/derived/DerivedAlternative.scala @@ -7,10 +7,10 @@ import shapeless3.deriving.K1.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of Alternative[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a nested type [x] =>> G[H[x]] where G: Alternative and H: Applicative - * it is a generic case class where all fields have a Alternative instance""") +@implicitNotFound("""Could not derive Alternative for ${F}. +Make sure it satisfies one of the following conditions: + * nested type [x] =>> G[H[x]] where G: Alternative and H: Applicative + * generic case class where all fields form Alternative""") type DerivedAlternative[F[_]] = Derived[Alternative[F]] object DerivedAlternative: type Or[F[_]] = Derived.Or[Alternative[F]] diff --git a/core/src/main/scala-3/cats/derived/DerivedApplicative.scala b/core/src/main/scala-3/cats/derived/DerivedApplicative.scala index 596a46f1..9110faf4 100644 --- a/core/src/main/scala-3/cats/derived/DerivedApplicative.scala +++ b/core/src/main/scala-3/cats/derived/DerivedApplicative.scala @@ -8,11 +8,11 @@ import shapeless3.deriving.K1.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of Applicative[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type [x] =>> T where T: Monoid - * it is a nested type [x] =>> G[H[x]] where G: Applicative and H: Applicative - * it is a generic case class where all fields have an Applicative instance""") +@implicitNotFound("""Could not derive Applicative for ${F}. +Make sure it satisfies one of the following conditions: + * constant type [x] =>> T where T: Monoid + * nested type [x] =>> G[H[x]] where G: Applicative and H: Applicative + * generic case class where all fields form Applicative""") type DerivedApplicative[F[_]] = Derived[Applicative[F]] object DerivedApplicative: type Or[F[_]] = Derived.Or[Applicative[F]] diff --git a/core/src/main/scala-3/cats/derived/DerivedApply.scala b/core/src/main/scala-3/cats/derived/DerivedApply.scala index 100cd8c6..70a643d6 100644 --- a/core/src/main/scala-3/cats/derived/DerivedApply.scala +++ b/core/src/main/scala-3/cats/derived/DerivedApply.scala @@ -8,11 +8,11 @@ import shapeless3.deriving.K1.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of Apply[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type [x] =>> T where T: Semigroup - * it is a nested type [x] =>> G[H[x]] where G: Apply and H: Apply - * it is a generic case class where all fields have an Apply instance""") +@implicitNotFound("""Could not derive Apply for ${F}. +Make sure it satisfies one of the following conditions: + * constant type [x] =>> T where T: Semigroup + * nested type [x] =>> G[H[x]] where G: Apply and H: Apply + * generic case class where all fields form Apply""") type DerivedApply[F[_]] = Derived[Apply[F]] object DerivedApply: type Or[F[_]] = Derived.Or[Apply[F]] diff --git a/core/src/main/scala-3/cats/derived/DerivedBand.scala b/core/src/main/scala-3/cats/derived/DerivedBand.scala index 4b23ccc4..bb4d4470 100644 --- a/core/src/main/scala-3/cats/derived/DerivedBand.scala +++ b/core/src/main/scala-3/cats/derived/DerivedBand.scala @@ -6,8 +6,8 @@ import shapeless3.deriving.K0.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of Band[A] where A = ${A}. -Make sure that A is a case class where all fields have a Band instance.""") +@implicitNotFound("""Could not derive Band for ${A}. +Make sure it is a case class where all fields form Band.""") type DerivedBand[A] = Derived[Band[A]] object DerivedBand: type Or[A] = Derived.Or[Band[A]] diff --git a/core/src/main/scala-3/cats/derived/DerivedBoundedSemilattice.scala b/core/src/main/scala-3/cats/derived/DerivedBoundedSemilattice.scala index fb5a84c0..4066b524 100644 --- a/core/src/main/scala-3/cats/derived/DerivedBoundedSemilattice.scala +++ b/core/src/main/scala-3/cats/derived/DerivedBoundedSemilattice.scala @@ -6,8 +6,8 @@ import shapeless3.deriving.K0.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of BoundedSemilattice[A] where A = ${A}. -Make sure that A is a case class where all fields have a BoundedSemilattice instance.""") +@implicitNotFound("""Could not derive BoundedSemilattice for ${A}. +Make sure it is a case class where all fields form BoundedSemilattice.""") type DerivedBoundedSemilattice[A] = Derived[BoundedSemilattice[A]] object DerivedBoundedSemilattice: type Or[A] = Derived.Or[BoundedSemilattice[A]] diff --git a/core/src/main/scala-3/cats/derived/DerivedCommutativeGroup.scala b/core/src/main/scala-3/cats/derived/DerivedCommutativeGroup.scala index 334d2c6d..19fffc4f 100644 --- a/core/src/main/scala-3/cats/derived/DerivedCommutativeGroup.scala +++ b/core/src/main/scala-3/cats/derived/DerivedCommutativeGroup.scala @@ -6,8 +6,8 @@ import shapeless3.deriving.K0.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of CommutativeGroup[A] where A = ${A}. -Make sure that A is a case class where all fields have a CommutativeGroup instance.""") +@implicitNotFound("""Could not derive CommutativeGroup for ${A}. +Make sure it is a case class where all fields form CommutativeGroup.""") type DerivedCommutativeGroup[A] = Derived[CommutativeGroup[A]] object DerivedCommutativeGroup: type Or[A] = Derived.Or[CommutativeGroup[A]] diff --git a/core/src/main/scala-3/cats/derived/DerivedCommutativeMonoid.scala b/core/src/main/scala-3/cats/derived/DerivedCommutativeMonoid.scala index a0c29cc1..df8ff446 100644 --- a/core/src/main/scala-3/cats/derived/DerivedCommutativeMonoid.scala +++ b/core/src/main/scala-3/cats/derived/DerivedCommutativeMonoid.scala @@ -6,8 +6,8 @@ import shapeless3.deriving.K0.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of CommutativeMonoid[A] where A = ${A}. -Make sure that A is a case class where all fields have a CommutativeMonoid instance.""") +@implicitNotFound("""Could not derive CommutativeMonoid for ${A}. +Make sure it is a case class where all fields form CommutativeMonoid.""") type DerivedCommutativeMonoid[A] = Derived[CommutativeMonoid[A]] object DerivedCommutativeMonoid: type Or[A] = Derived.Or[CommutativeMonoid[A]] diff --git a/core/src/main/scala-3/cats/derived/DerivedCommutativeSemigroup.scala b/core/src/main/scala-3/cats/derived/DerivedCommutativeSemigroup.scala index d5553741..2909117c 100644 --- a/core/src/main/scala-3/cats/derived/DerivedCommutativeSemigroup.scala +++ b/core/src/main/scala-3/cats/derived/DerivedCommutativeSemigroup.scala @@ -6,8 +6,8 @@ import shapeless3.deriving.K0.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of CommutativeSemigroup[A] where A = ${A}. -Make sure that A is a case class where all fields have a CommutativeSemigroup instance.""") +@implicitNotFound("""Could not derive CommutativeSemigroup for ${A}. +Make sure it is a case class where all fields form CommutativeSemigroup.""") type DerivedCommutativeSemigroup[A] = Derived[CommutativeSemigroup[A]] object DerivedCommutativeSemigroup: type Or[A] = Derived.Or[CommutativeSemigroup[A]] diff --git a/core/src/main/scala-3/cats/derived/DerivedContravariant.scala b/core/src/main/scala-3/cats/derived/DerivedContravariant.scala index 1b94a0ce..b1b1e141 100644 --- a/core/src/main/scala-3/cats/derived/DerivedContravariant.scala +++ b/core/src/main/scala-3/cats/derived/DerivedContravariant.scala @@ -8,12 +8,13 @@ import shapeless3.deriving.K1.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of Contravariant[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type [x] =>> T - * it is a nested type [x] =>> G[H[x]] where G: Functor and H: Contravariant - * it is a generic case class where all fields have a Contravariant instance - * it is a generic sealed trait where all subclasses have a Contravariant instance""") +@implicitNotFound("""Could not derive Contravariant for ${F}. +Make sure it satisfies one of the following conditions: + * constant type [x] =>> T + * nested type [x] =>> G[H[x]] where G: Functor and H: Contravariant + * generic case class where all fields form Contravariant + * generic sealed trait where all subclasses form Contravariant + * generic enum where all variants form Contravariant""") type DerivedContravariant[F[_]] = Derived[Contravariant[F]] object DerivedContravariant: type Or[F[_]] = Derived.Or[Contravariant[F]] diff --git a/core/src/main/scala-3/cats/derived/DerivedEmpty.scala b/core/src/main/scala-3/cats/derived/DerivedEmpty.scala index 2f3da0af..0175d536 100644 --- a/core/src/main/scala-3/cats/derived/DerivedEmpty.scala +++ b/core/src/main/scala-3/cats/derived/DerivedEmpty.scala @@ -6,10 +6,11 @@ import shapeless3.deriving.K0.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of Empty[A] where A = ${A}. -Make sure that A satisfies one of the following conditions: - * it is a case class where all fields have an Empty instance - * it is a sealed trait where exactly one subclass has an Empty instance""") +@implicitNotFound("""Could not derive Empty for ${A}. +Make sure it satisfies one of the following conditions: + * case class where all fields form Empty + * sealed trait where exactly one subclass forms Empty + * enum where exactly one variant forms Empty""") type DerivedEmpty[A] = Derived[Empty[A]] object DerivedEmpty: type Or[A] = Derived.Or[Empty[A]] diff --git a/core/src/main/scala-3/cats/derived/DerivedEmptyK.scala b/core/src/main/scala-3/cats/derived/DerivedEmptyK.scala index 27f5bb6d..34c1da36 100644 --- a/core/src/main/scala-3/cats/derived/DerivedEmptyK.scala +++ b/core/src/main/scala-3/cats/derived/DerivedEmptyK.scala @@ -9,13 +9,14 @@ import scala.annotation.* import scala.compiletime.summonInline import scala.util.NotGiven -@implicitNotFound("""Could not derive an instance of EmptyK[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type [x] =>> T where T: Empty - * it is a nested type [x] =>> G[H[x]] where G: EmptyK - * it is a nested type [x] =>> G[H[x]] where G: Pure and H: EmptyK - * it is a generic case class where all fields have an EmptyK instance - * it is a generic sealed trait where exactly one subclass has an EmptyK instance""") +@implicitNotFound("""Could not derive EmptyK for ${F}. +Make sure it satisfies one of the following conditions: + * constant type [x] =>> T where T: Empty + * nested type [x] =>> G[H[x]] where G: EmptyK + * nested type [x] =>> G[H[x]] where G: Pure and H: EmptyK + * generic case class where all fields form EmptyK + * generic sealed trait where exactly one subclass forms EmptyK + * generic enum where exactly one variant forms EmptyK""") type DerivedEmptyK[F[_]] = Derived[EmptyK[F]] object DerivedEmptyK: type Or[F[_]] = Derived.Or[EmptyK[F]] diff --git a/core/src/main/scala-3/cats/derived/DerivedEq.scala b/core/src/main/scala-3/cats/derived/DerivedEq.scala index f7b1f48b..50d9d35f 100644 --- a/core/src/main/scala-3/cats/derived/DerivedEq.scala +++ b/core/src/main/scala-3/cats/derived/DerivedEq.scala @@ -7,10 +7,11 @@ import shapeless3.deriving.K0.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of Eq[A] where A = ${A}. +@implicitNotFound("""Could not derive Eq for ${A}. Make sure that A satisfies one of the following conditions: - * it is a case class where all fields have an Eq instance - * it is a sealed trait where all subclasses have an Eq instance""") + * case class where all fields form Eq + * sealed trait where all subclasses form Eq + * enum where all variants form Eq""") type DerivedEq[A] = Derived[Eq[A]] object DerivedEq: type Or[A] = Derived.Or[Eq[A]] diff --git a/core/src/main/scala-3/cats/derived/DerivedFoldable.scala b/core/src/main/scala-3/cats/derived/DerivedFoldable.scala index c323aa06..92cdcd7b 100644 --- a/core/src/main/scala-3/cats/derived/DerivedFoldable.scala +++ b/core/src/main/scala-3/cats/derived/DerivedFoldable.scala @@ -8,12 +8,13 @@ import shapeless3.deriving.{Const, Continue} import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of Foldable[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type [x] =>> T - * it is a nested type [x] =>> G[H[x]] where G: Foldable and H: Foldable - * it is a generic case class where all fields have a Foldable instance - * it is a generic sealed trait where all subclasses have a Foldable instance""") +@implicitNotFound("""Could not derive Foldable for ${F}. +Make sure it satisfies one of the following conditions: + * constant type [x] =>> T + * nested type [x] =>> G[H[x]] where G: Foldable and H: Foldable + * generic case class where all fields form Foldable + * generic sealed trait where all subclasses form Foldable + * generic enum where all variants form Foldable""") type DerivedFoldable[F[_]] = Derived[Foldable[F]] object DerivedFoldable: type Or[F[_]] = Derived.Or[Foldable[F]] diff --git a/core/src/main/scala-3/cats/derived/DerivedFunctor.scala b/core/src/main/scala-3/cats/derived/DerivedFunctor.scala index b7ab5590..a67698e6 100644 --- a/core/src/main/scala-3/cats/derived/DerivedFunctor.scala +++ b/core/src/main/scala-3/cats/derived/DerivedFunctor.scala @@ -8,13 +8,14 @@ import shapeless3.deriving.K1.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of Functor[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type [x] =>> T - * it is a nested type [x] =>> G[H[x]] where G: Functor and H: Functor - * it is a nested type [x] =>> G[H[x]] where G: Contravariant and H: Contravariant - * it is a generic case class where all fields have a Functor instance - * it is a generic sealed trait where all subclasses have a Functor instance""") +@implicitNotFound("""Could not derive Functor for ${F}. +Make sure it satisfies one of the following conditions: + * constant type [x] =>> T + * nested type [x] =>> G[H[x]] where G: Functor and H: Functor + * nested type [x] =>> G[H[x]] where G: Contravariant and H: Contravariant + * generic case class where all fields form Functor + * generic sealed trait where all subclasses form Functor + * generic enum where all variants form Functor""") type DerivedFunctor[F[_]] = Derived[Functor[F]] object DerivedFunctor: type Or[F[_]] = Derived.Or[Functor[F]] diff --git a/core/src/main/scala-3/cats/derived/DerivedGroup.scala b/core/src/main/scala-3/cats/derived/DerivedGroup.scala index f00c88bc..0bf99895 100644 --- a/core/src/main/scala-3/cats/derived/DerivedGroup.scala +++ b/core/src/main/scala-3/cats/derived/DerivedGroup.scala @@ -6,8 +6,8 @@ import shapeless3.deriving.K0.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of Group[A] where A = ${A}. -Make sure that A is a case class where all fields have a Group instance.""") +@implicitNotFound("""Could not derive Group for ${A}. +Make sure it is a case class where all fields form Group.""") type DerivedGroup[A] = Derived[Group[A]] object DerivedGroup: type Or[A] = Derived.Or[Group[A]] diff --git a/core/src/main/scala-3/cats/derived/DerivedHash.scala b/core/src/main/scala-3/cats/derived/DerivedHash.scala index 4f6261e3..78a955fb 100644 --- a/core/src/main/scala-3/cats/derived/DerivedHash.scala +++ b/core/src/main/scala-3/cats/derived/DerivedHash.scala @@ -8,10 +8,11 @@ import scala.annotation.* import scala.compiletime.* import scala.util.hashing.MurmurHash3 -@implicitNotFound("""Could not derive an instance of Hash[A] where A = ${A}. -Make sure that A satisfies one of the following conditions: - * it is a case class where all fields have a Hash instance - * it is a sealed trait where all subclasses have a Hash instance""") +@implicitNotFound("""Could not derive Hash for ${A}. +Make sure it satisfies one of the following conditions: + * case class where all fields form Hash + * sealed trait where all subclasses form Hash + * enum where all variants form Hash""") type DerivedHash[A] = Derived[Hash[A]] object DerivedHash: type Or[A] = Derived.Or[Hash[A]] diff --git a/core/src/main/scala-3/cats/derived/DerivedInvariant.scala b/core/src/main/scala-3/cats/derived/DerivedInvariant.scala index 6f4a5106..064caad5 100644 --- a/core/src/main/scala-3/cats/derived/DerivedInvariant.scala +++ b/core/src/main/scala-3/cats/derived/DerivedInvariant.scala @@ -8,12 +8,13 @@ import shapeless3.deriving.K1.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of Invariant[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type [x] => T - * it is a nested type [x] => G[H[x]] where G: Invariant and H: Invariant - * it is a generic case class where all fields have an Invariant instance - * it is a generic sealed trait where all subclasses have an Invariant instance""") +@implicitNotFound("""Could not derive Invariant for ${F}. +Make sure it satisfies one of the following conditions: + * constant type [x] => T + * nested type [x] => G[H[x]] where G: Invariant and H: Invariant + * generic case class where all fields form Invariant + * generic sealed trait where all subclasses form Invariant + * generic enum where all variants form Invariant""") type DerivedInvariant[F[_]] = Derived[Invariant[F]] object DerivedInvariant: type Or[F[_]] = Derived.Or[Invariant[F]] diff --git a/core/src/main/scala-3/cats/derived/DerivedMonoid.scala b/core/src/main/scala-3/cats/derived/DerivedMonoid.scala index ab9d216b..b2a1c5ca 100644 --- a/core/src/main/scala-3/cats/derived/DerivedMonoid.scala +++ b/core/src/main/scala-3/cats/derived/DerivedMonoid.scala @@ -6,8 +6,8 @@ import shapeless3.deriving.K0.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of Monoid[A] where A = ${A}. -Make sure that A is a case class where all fields have a Monoid instance.""") +@implicitNotFound("""Could not derive Monoid for ${A}. +Make sure it is a case class where all fields form Monoid.""") type DerivedMonoid[A] = Derived[Monoid[A]] object DerivedMonoid: type Or[A] = Derived.Or[Monoid[A]] diff --git a/core/src/main/scala-3/cats/derived/DerivedMonoidK.scala b/core/src/main/scala-3/cats/derived/DerivedMonoidK.scala index 6eaf8aae..2202c810 100644 --- a/core/src/main/scala-3/cats/derived/DerivedMonoidK.scala +++ b/core/src/main/scala-3/cats/derived/DerivedMonoidK.scala @@ -9,12 +9,12 @@ import scala.annotation.* import scala.compiletime.* import scala.util.NotGiven -@implicitNotFound("""Could not derive an instance of MonoidK[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type [x] =>> T where T: Monoid - * it is a nested type [x] =>> G[H[x]] where G: MonoidK - * it is a nested type [x] =>> G[H[x]] where G: Applicative and H: MonoidK - * it is a generic case class where all fields have a MonoidK instance""") +@implicitNotFound("""Could not derive MonoidK for ${F}. +Make sure it satisfies one of the following conditions: + * constant type [x] =>> T where T: Monoid + * nested type [x] =>> G[H[x]] where G: MonoidK + * nested type [x] =>> G[H[x]] where G: Applicative and H: MonoidK + * generic case class where all fields form MonoidK""") type DerivedMonoidK[F[_]] = Derived[MonoidK[F]] object DerivedMonoidK: type Or[F[_]] = Derived.Or[MonoidK[F]] diff --git a/core/src/main/scala-3/cats/derived/DerivedNonEmptyAlternative.scala b/core/src/main/scala-3/cats/derived/DerivedNonEmptyAlternative.scala index 33cfa9ed..fc1ea59b 100644 --- a/core/src/main/scala-3/cats/derived/DerivedNonEmptyAlternative.scala +++ b/core/src/main/scala-3/cats/derived/DerivedNonEmptyAlternative.scala @@ -7,10 +7,10 @@ import shapeless3.deriving.K1.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of NonEmptyAlternative[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a nested type [x] =>> G[H[x]] where G: NonEmptyAlternative and H: Applicative - * it is a generic case class where all fields have a NonEmptyAlternative instance""") +@implicitNotFound("""Could not derive NonEmptyAlternative for ${F}. +Make sure it satisfies one of the following conditions: + * nested type [x] =>> G[H[x]] where G: NonEmptyAlternative and H: Applicative + * generic case class where all fields form NonEmptyAlternative""") type DerivedNonEmptyAlternative[F[_]] = Derived[NonEmptyAlternative[F]] object DerivedNonEmptyAlternative: type Or[F[_]] = Derived.Or[NonEmptyAlternative[F]] diff --git a/core/src/main/scala-3/cats/derived/DerivedNonEmptyTraverse.scala b/core/src/main/scala-3/cats/derived/DerivedNonEmptyTraverse.scala index b390f4ae..2bca6420 100644 --- a/core/src/main/scala-3/cats/derived/DerivedNonEmptyTraverse.scala +++ b/core/src/main/scala-3/cats/derived/DerivedNonEmptyTraverse.scala @@ -7,11 +7,12 @@ import shapeless3.deriving.K1.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of NonEmptyTraverse[F] where F = ${F}. +@implicitNotFound("""Could not derive NonEmptyTraverse for ${F}. Make sure that F[_] satisfies one of the following conditions: - * it is a nested type [x] =>> G[H[x]] where G: NonEmptyTraverse and H: NonEmptyTraverse - * it is a generic case class where at least one field has a NonEmptyTraverse and the rest Traverse instances - * it is a generic sealed trait where all subclasses have a NonEmptyTraverse instance""") + * nested type [x] =>> G[H[x]] where G: NonEmptyTraverse and H: NonEmptyTraverse + * generic case class where at least one field forms NonEmptyTraverse and the rest form Traverse + * generic sealed trait where all subclasses form NonEmptyTraverse + * generic enum where all variants form NonEmptyTraverse""") type DerivedNonEmptyTraverse[F[_]] = Derived[NonEmptyTraverse[F]] object DerivedNonEmptyTraverse: type Or[F[_]] = Derived.Or[NonEmptyTraverse[F]] diff --git a/core/src/main/scala-3/cats/derived/DerivedOrder.scala b/core/src/main/scala-3/cats/derived/DerivedOrder.scala index fc322392..75e81e10 100644 --- a/core/src/main/scala-3/cats/derived/DerivedOrder.scala +++ b/core/src/main/scala-3/cats/derived/DerivedOrder.scala @@ -7,10 +7,11 @@ import shapeless3.deriving.K0.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of Order[A] where A = ${A}. -Make sure that A satisfies one of the following conditions: - * it is a case class where all fields have an Order instance - * it is a sealed trait where all subclasses have an Order instance""") +@implicitNotFound("""Could not derive Order for ${A}. +Make sure it satisfies one of the following conditions: + * case class where all fields form Order + * sealed trait where all subclasses form Order + * enum where all variants form Order""") type DerivedOrder[A] = Derived[Order[A]] object DerivedOrder: type Or[A] = Derived.Or[Order[A]] diff --git a/core/src/main/scala-3/cats/derived/DerivedPartialOrder.scala b/core/src/main/scala-3/cats/derived/DerivedPartialOrder.scala index e8f41867..ffa8cefe 100644 --- a/core/src/main/scala-3/cats/derived/DerivedPartialOrder.scala +++ b/core/src/main/scala-3/cats/derived/DerivedPartialOrder.scala @@ -7,10 +7,11 @@ import shapeless3.deriving.K0.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of PartialOrder[A] where A = ${A}. -Make sure that A satisfies one of the following conditions: - * it is a case class where all fields have a PartialOrder instance - * it is a sealed trait where all subclasses have a PartialOrder instance""") +@implicitNotFound("""Could not derive PartialOrder for ${A}. +Make sure it satisfies one of the following conditions: + * case class where all fields form PartialOrder + * sealed trait where all subclasses form PartialOrder + * enum where all variants form PartialOrder""") type DerivedPartialOrder[A] = Derived[PartialOrder[A]] object DerivedPartialOrder: type Or[A] = Derived.Or[PartialOrder[A]] diff --git a/core/src/main/scala-3/cats/derived/DerivedPure.scala b/core/src/main/scala-3/cats/derived/DerivedPure.scala index a5eff25d..20bc0fd3 100644 --- a/core/src/main/scala-3/cats/derived/DerivedPure.scala +++ b/core/src/main/scala-3/cats/derived/DerivedPure.scala @@ -8,11 +8,11 @@ import shapeless3.deriving.K1.* import scala.annotation.* import scala.compiletime.summonInline -@implicitNotFound("""Could not derive an instance of Pure[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type [x] =>> T where T: Empty - * it is a nested type [x] =>> G[H[x]] where G: Pure and H: Pure - * it is a generic case class where all fields have a Pure instance""") +@implicitNotFound("""Could not derive Pure for ${F}. +Make sure it satisfies one of the following conditions: + * constant type [x] =>> T where T: Empty + * nested type [x] =>> G[H[x]] where G: Pure and H: Pure + * generic case class where all fields form Pure""") type DerivedPure[F[_]] = Derived[Pure[F]] object DerivedPure: type Or[F[_]] = Derived.Or[Pure[F]] diff --git a/core/src/main/scala-3/cats/derived/DerivedReducible.scala b/core/src/main/scala-3/cats/derived/DerivedReducible.scala index 1ccc463c..46bdc597 100644 --- a/core/src/main/scala-3/cats/derived/DerivedReducible.scala +++ b/core/src/main/scala-3/cats/derived/DerivedReducible.scala @@ -8,11 +8,12 @@ import shapeless3.deriving.K1.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of Reducible[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a nested type [x] =>> G[H[x]] where G: Reducible and H: Reducible - * it is a generic case class where at least one field has a Reducible and the rest Foldable instances - * it is a generic sealed trait where all subclasses have a Reducible instance""") +@implicitNotFound("""Could not derive Reducible for ${F}. +Make sure it satisfies one of the following conditions: + * nested type [x] =>> G[H[x]] where G: Reducible and H: Reducible + * generic case class where at least one field forms Reducible and the rest form Foldable + * generic sealed trait where all subclasses form Reducible + * generic enum where all variants form Reducible""") type DerivedReducible[F[_]] = Derived[Reducible[F]] object DerivedReducible: type Or[F[_]] = Derived.Or[Reducible[F]] diff --git a/core/src/main/scala-3/cats/derived/DerivedSemigroup.scala b/core/src/main/scala-3/cats/derived/DerivedSemigroup.scala index d499dfe3..ec20c079 100644 --- a/core/src/main/scala-3/cats/derived/DerivedSemigroup.scala +++ b/core/src/main/scala-3/cats/derived/DerivedSemigroup.scala @@ -6,8 +6,8 @@ import shapeless3.deriving.K0.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of Semigroup[A] where A = ${A}. -Make sure that A is a case class where all fields have a Semigroup instance.""") +@implicitNotFound("""Could not derive Semigroup for ${A}. +Make sure it is a case class where all fields form Semigroup.""") type DerivedSemigroup[A] = Derived[Semigroup[A]] object DerivedSemigroup: type Or[A] = Derived.Or[Semigroup[A]] diff --git a/core/src/main/scala-3/cats/derived/DerivedSemigroupK.scala b/core/src/main/scala-3/cats/derived/DerivedSemigroupK.scala index 5ffb7a33..d8220357 100644 --- a/core/src/main/scala-3/cats/derived/DerivedSemigroupK.scala +++ b/core/src/main/scala-3/cats/derived/DerivedSemigroupK.scala @@ -9,12 +9,12 @@ import scala.annotation.* import scala.compiletime.* import scala.util.NotGiven -@implicitNotFound("""Could not derive an instance of SemigroupK[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type [x] =>> T where T: Semigroup - * it is a nested type [x] =>> G[H[x]] where G: SemigroupK - * it is a nested type [x] =>> G[H[x]] where G: Apply and H: SemigroupK - * it is a generic case class where all fields have a SemigroupK instance""") +@implicitNotFound("""Could not derive SemigroupK for ${F}. +Make sure it satisfies one of the following conditions: + * constant type [x] =>> T where T: Semigroup + * nested type [x] =>> G[H[x]] where G: SemigroupK + * nested type [x] =>> G[H[x]] where G: Apply and H: SemigroupK + * generic case class where all fields form SemigroupK""") type DerivedSemigroupK[F[_]] = Derived[SemigroupK[F]] object DerivedSemigroupK: type Or[F[_]] = Derived.Or[SemigroupK[F]] diff --git a/core/src/main/scala-3/cats/derived/DerivedSemilattice.scala b/core/src/main/scala-3/cats/derived/DerivedSemilattice.scala index 6df4fe61..b18fc97b 100644 --- a/core/src/main/scala-3/cats/derived/DerivedSemilattice.scala +++ b/core/src/main/scala-3/cats/derived/DerivedSemilattice.scala @@ -6,8 +6,8 @@ import shapeless3.deriving.K0.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of Semilattice[A] where A = ${A}. -Make sure that A is a case class where all fields have a Semilattice instance.""") +@implicitNotFound("""Could not derive Semilattice for ${A}. +Make sure it is a case class where all fields form Semilattice.""") type DerivedSemilattice[A] = Derived[Semilattice[A]] object DerivedSemilattice: type Or[A] = Derived.Or[Semilattice[A]] diff --git a/core/src/main/scala-3/cats/derived/DerivedShow.scala b/core/src/main/scala-3/cats/derived/DerivedShow.scala index a1adb97b..283fdf9b 100644 --- a/core/src/main/scala-3/cats/derived/DerivedShow.scala +++ b/core/src/main/scala-3/cats/derived/DerivedShow.scala @@ -7,10 +7,11 @@ import shapeless3.deriving.Labelling import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of Show[A] where A = ${A}. -Make sure that A satisfies one of the following conditions: - * it is a case class where all fields have a Show instance - * it is a sealed trait where all subclasses have a Show instance""") +@implicitNotFound("""Could not derive Show for ${A}. +Make sure it satisfies one of the following conditions: + * case class where all fields form Show + * sealed trait where all subclasses form Show + * enum where all variants form Show""") type DerivedShow[A] = Derived[Show[A]] object DerivedShow: type Or[A] = Derived.Or[Show[A]] diff --git a/core/src/main/scala-3/cats/derived/DerivedShowPretty.scala b/core/src/main/scala-3/cats/derived/DerivedShowPretty.scala index 14248034..5321583b 100644 --- a/core/src/main/scala-3/cats/derived/DerivedShowPretty.scala +++ b/core/src/main/scala-3/cats/derived/DerivedShowPretty.scala @@ -14,10 +14,11 @@ trait ShowPretty[A] extends Show[A]: object ShowPretty: inline def apply[A](using A: ShowPretty[A]): A.type = A -@implicitNotFound("""Could not derive an instance of ShowPretty[A] where A = ${A}. -Make sure that A satisfies one of the following conditions: - * it is a case class where all fields have a Show instance - * it is a sealed trait where all subclasses have a Show instance""") +@implicitNotFound("""Could not derive ShowPretty for ${A}. +Make sure it satisfies one of the following conditions: + * case class where all fields form Show + * sealed trait where all subclasses form Show + * enum where all variants form Show""") type DerivedShowPretty[A] = Derived[ShowPretty[A]] object DerivedShowPretty: opaque type Or[A] = A => List[String] diff --git a/core/src/main/scala-3/cats/derived/DerivedTraverse.scala b/core/src/main/scala-3/cats/derived/DerivedTraverse.scala index c411a9a4..c0aa545e 100644 --- a/core/src/main/scala-3/cats/derived/DerivedTraverse.scala +++ b/core/src/main/scala-3/cats/derived/DerivedTraverse.scala @@ -8,12 +8,13 @@ import shapeless3.deriving.K1.* import scala.annotation.* import scala.compiletime.* -@implicitNotFound("""Could not derive an instance of Traverse[F] where F = ${F}. -Make sure that F[_] satisfies one of the following conditions: - * it is a constant type [x] =>> T - * it is a nested type [x] =>> G[H[x]] where G: Traverse and H: Traverse - * it is a generic case class where all fields have a Traverse instance - * it is a generic sealed trait where all subclasses have a Traverse instance""") +@implicitNotFound("""Could not derive Traverse for ${F}. +Make sure it satisfies one of the following conditions: + * constant type [x] =>> T + * nested type [x] =>> G[H[x]] where G: Traverse and H: Traverse + * generic case class where all fields form Traverse + * generic sealed trait where all subclasses form Traverse + * generic enum where all variants form Traverse""") type DerivedTraverse[F[_]] = Derived[Traverse[F]] object DerivedTraverse: type Or[F[_]] = Derived.Or[Traverse[F]]