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
For example I want infer pbdirect instances for the following sealed trait:
importpbdirect._sealedtraitMyListcaseclassCons(i: Int, l: MyList) extendsMyListcaseobjectNilextendsMyListPBWriter[MyList] // error: could not find implicit value for evidence parameter of type pbdirect.PBWriter[MyList]PBReader[MyList] // ok
PBReader is inferred just fine, but PBWriter is not.
My guess is that it should be tail: Lazy[PBWriter[T]] in implicit def cconsWriter instead of just tail: PBWriter[T]
implicitdefcconsWriter[H, T<:Coproduct](
implicithead: PBWriter[H],
tail: PBWriter[T]):PBWriter[H:+:T] // it should be Lazy[PBWriter[T]]
For example I want infer
pbdirect
instances for the following sealed trait:PBReader
is inferred just fine, butPBWriter
is not.My guess is that it should be
tail: Lazy[PBWriter[T]]
inimplicit def cconsWriter
instead of justtail: PBWriter[T]
just as it's implemented for
PBReader
The text was updated successfully, but these errors were encountered: