eg in DerivedFunctor we have
given [F[_], G[_]](using F: Or[F], G: Or[G]): DerivedFunctor[[x] =>> F[G[x]]] =
F.unify.compose(G.unify)
given [F[_], G[_]](using F: Contravariant[F], G: Contravariant[G]): DerivedFunctor[[x] =>> F[G[x]]] =
F.compose(G)
and in DerivedSemigroupK we have
given [F[_], G[_]](using F: Or[F]): DerivedSemigroupK[[x] =>> F[G[x]]] =
F.unify.compose[G]
given [F[_], G[_]](using N: NotGiven[Or[F]], F: DerivedApply.Or[F], G: Or[G]): DerivedSemigroupK[[x] =>> F[G[x]]] =
new SemigroupK[[x] =>> F[G[x]]]:
final override def combineK[A](x: F[G[A]], y: F[G[A]]): F[G[A]] = F.unify.map2(x, y)(G.unify.combineK(_, _))
These should probably be consistent. I would have thought that we would need the Or version but things seem to work fine without it
eg in
DerivedFunctorwe haveand in
DerivedSemigroupKwe haveThese should probably be consistent. I would have thought that we would need the
Orversion but things seem to work fine without it