Monoid
derivation applies requires Monoid
for type parameter even when unnecessary
#546
Labels
Monoid
derivation applies requires Monoid
for type parameter even when unnecessary
#546
At least on scala 3 (haven't tested on scala 2) a derived
Monoid[F[A]]
requires aMonoid[A]
even ifA
is only referenced within types that have aMonoidK
instance, i.e. that can form aMonoid
regardless of their type parameter.Could it instead require any number of
Monoid[B]
s whereB
is the full type of the each field that referencesA
? For example:Full example:
https://scastie.scala-lang.org/mrdziuban/wy1ITtp9SCCyUe7uUgfisA/4
The text was updated successfully, but these errors were encountered: