PartialApplHelper

com.tschuchort.hkd.HkdFor$package.HkdFor_.PartialApplHelper
class PartialApplHelper[T] extends Dynamic

Attributes

Graph
Supertypes
trait Dynamic
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

inline def applyDynamic[F[_]](methodName: "apply")(inline args: Any*): HkdFor[T, F]
inline def applyDynamicNamed[F[_]](methodName: "apply")(inline args: (String, Any)*): HkdFor[T, F]
def unapply[F[_]](h: HkdFor_[T][F])(using m: ProductOf[T]): Map[m.MirroredElemTypes, F]
transparent inline def unapply[S, F[_]](using inline m: ProductOf[T])(using tt: TypeTest[HkdFor[S, F], HkdFor[T, F]])(h: HkdFor[S, F]): Option[Any] | Boolean

When an unapply method like this is called and F is not explicitly given, then F can not be inferred correctly:

When an unapply method like this is called and F is not explicitly given, then F can not be inferred correctly:

  HkdFor_[Foo][Option](???) match
    case HkdFor_[Foo](a, b, c) => ??? // F is inferred as some unknown F$1 instead of Option

Because a type test introduces a level of indirection and the inference algorithm cannot "carry" the F through multiple levels of indirection. We need to apply the type test ourselves, so that we remain in control of type inference.

Attributes