HKDGeneric

sealed trait HKDGeneric[A]

A type somewhat like Mirror.Of allowing manipulating a type as if it was defined as a higher kinded type.

Type parameters:
A

The type being abstracted over.

Companion:
object
class Object
trait Matchable
class Any

Type members

Classlikes

class IdxWrapper[X](val idx: Index[X])

A wrapper for Index where we want wildcards of it.

A wrapper for Index where we want wildcards of it.

Types

type ElemTop

The top type for the inner type of Index and Gen.

The top type for the inner type of Index and Gen.

type FieldOf[Name <: Names] <: ElemTop

Returns the type of a field given its name.

Returns the type of a field given its name.

type Gen[_[_]]

A representation of A supporting higher kinded types.

A representation of A supporting higher kinded types.

type Index[A]

The index of the Gen type.

The index of the Gen type.

type Names <: String

The name of the fields of A type. Field in this case can mean either the children of a sum type, or the fields of a product type.

The name of the fields of A type. Field in this case can mean either the children of a sum type, or the fields of a product type.

type TupleRep <: Tuple

A tuple representation of A.

A tuple representation of A.

The name of the A type.

The name of the A type.

Value members

Abstract methods

def genToTuple[F[_]](gen: Gen[F]): Map[TupleRep, F]

Converts Gen to the tuple representation.

Converts Gen to the tuple representation.

def nameToIndex[Name <: Names](name: Name): Index[FieldOf[Name]]

Returns the index of the field a name corresponds to.

Returns the index of the field a name corresponds to.

def names: Gen[Const[Names]]

The name of the fields of A type. Field in this case can mean either the children of a sum type, or the fields of a product type.

The name of the fields of A type. Field in this case can mean either the children of a sum type, or the fields of a product type.

Validates a string as a name if it matches the name of a field.

Validates a string as a name if it matches the name of a field.

def tupleToGen[F[_]](tuple: Map[TupleRep, F]): Gen[F]

Converts the tuple representation to Gen.

Converts the tuple representation to Gen.

The name of the A type.

The name of the A type.

Concrete methods

inline def upcastIndex[X](idx: Index[X]): IdxWrapper[_ <: ElemTop]

Upcast an index to its bound.

Upcast an index to its bound.

Abstract fields

lazy val representable: Aux[Gen, Index]
lazy val traverse: TraverseKC[Gen]

Givens

Givens

given given_TraverseKC_Gen: TraverseKC[Gen]