You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But the FunctionK on the coproduct cannot be summoned
valFooBarToOpt=CopK.FunctionK.summon[FooBarOp, Option]
[error] could not find implicit value for parameter e: cats.arrow.FunctionK[FooBar.this.FooOp,Option]
[error] valFooBarToOpt=CopK.FunctionK.summon[FooBarOp, Option]
[error] ^
Considering the following example where
FooOp[A]
is defined inside a trait which has aT
type parameterBarOp[A]
is defined simply at the top-levelIn the context where
T
is still generic, I can define the coproduct ofFooOp
andBarOp
as follow:Now fixing
T
to something specific, I can define twoFunctionK
on bothFooOp
andBarOp
But the
FunctionK
on the coproduct cannot be summonedUsing
CopK.FunctionK.of
does not work eitherNote that the
FunctionK
can be implemented by hand so it is legitimate to try to have it implicitlyThe example above has been tested with scala 2.12.8
The text was updated successfully, but these errors were encountered: