InlineHKDGeneric

sealed trait InlineHKDGeneric[A]

A type like HKDGeneric but where as much as possible is defined inline, and tries to generate as simple bytecode as possible. Might be more error prone, and produce bigger classes using this, but the bytecode is much simpler.

Type parameters:
A

The type being abstracted over.

Companion:
object
class Object
trait Matchable
class Any
class DerivedImpl[A, ElemTypes, ElemLabels, TypeName0, NamesUnion]
class DerivedImpl[A, ElemTypes, ElemLabels, TypeName0]

Type members

Classlikes

class IdxWrapper[X](val idx: IndexAux[X & ElemTop])

A wrapper for Index where we want no bound on what X can be.

A wrapper for Index where we want no bound on what X can be.

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

The index of the Gen type.

The index of the Gen type.

type IndexAux[X0 <: ElemTop] = Index { type X = X0; }
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

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

Converts Gen to the tuple representation.

Converts Gen to the tuple representation.

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

Returns the index of the field a name corresponds to.

Returns the index of the field a name corresponds to.

inline 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.

inline def stringToName(s: String): Option[Names]

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.

inline def tabulateFoldLeft[B](inline start: B)(inline f: (B, Index) => B): B
inline def tabulateK[B[_]](inline f: (i: Index) => B[<none>])(using classTag: ClassTag[B[ElemTop]]): Gen[B]
inline def tabulateTraverseK[G[_], B[_]](inline f: (i: Index) => G[B[<none>]])(using inline G: Applicative[G], classTag: ClassTag[B[ElemTop]]): G[Gen[B]]
inline def tupleToGen[F[_]](tuple: Map[TupleRep, F]): Gen[F]

Converts the tuple representation to Gen.

Converts the tuple representation to Gen.

inline def typeName: TypeName

The name of the A type.

The name of the A type.

Concrete methods

inline def indicesK: Gen[IdxWrapper]
inline def tabulateConst[B](inline f: Index => B)(using ClassTag[B]): Gen[Const[B]]
inline def tabulateTraverseIdK[G[_]](inline f: (i: Index) => G[<none>])(using inline G: Applicative[G]): G[Gen[Id]]
inline def unitK: Gen[Const[Unit]]

Abstract fields

Extensions

Extensions

extension [A[_]](a: ValueK[A])
inline def pure: Gen[A]
extension [A[_], B[_]](f: FunctionK[A, B])
inline def liftK: Gen[A] #~>#: Gen[B]
extension [A[_]](fa: Gen[A])
inline def flatMapK[B[_]](inline f: A ~>#: Gen[B]): Gen[B]
extension [B[_]](fa: Gen[B])
inline def indexK(rep: Index): B[<none>]
extension [A[_]](fa: Gen[A])
inline def map2Const[B[_], Z](fb: Gen[B])(inline f: [X] => (x$1: A[X], x$2: B[X]) => Z): Gen[Const[Z]]
inline def map2K[B[_], Z[_]](fb: Gen[B])(inline f: [X] => (x$1: A[X], x$2: B[X]) => Z[X]): Gen[Z]
inline def tupledK[B[_]](fb: Gen[B]): Gen[Tuple2K[A, B]]
extension [A](fa: Gen[Const[A]])
inline def toListK: List[A]
extension [A[_]](fa: Gen[A])
inline def sequenceIdK(using inline G: Applicative[A]): A[Gen[Id]]
inline def traverseIdK[G[_]](inline f: FunctionK[A, G])(using inline G: Applicative[G]): G[Gen[Id]]
inline def traverseK[G[_], B[_]](inline f: FunctionK[A, Compose2[G, B]])(using inline G: Applicative[G], classTag: ClassTag[B[ElemTop]]): G[Gen[B]]
extension [A[_]](fa: Gen[A])
inline def asK[B[_]](inline b: ValueK[B]): Gen[B]
inline def mapConst[B](inline f: A ~>#: B): Gen[Const[B]]
inline def mapK[B[_]](inline f: FunctionK[A, B]): Gen[B]
inline def voidK: Gen[Const[Unit]]
inline def widen[B[D]]: Gen[B]
extension [A[_]](fa: Gen[A])
inline def foldLeftK[B](inline b: B)(inline f: B => A ~>#: B): B
inline def foldMapK[B](inline f: A ~>#: B)(using B: Monoid[B]): B
extension [A[_], B[_]](ff: Gen[[D] =>> A[D] => B[D]])
inline def ap(fa: Gen[A]): Gen[B]
extension [A[_]](ffa: Gen[Const[Gen[A]]])
inline def flattenK: Gen[A]
extension [G[_], A[_]](fga: Gen[Compose2[G, A]])
inline def sequenceK(using inline G: Applicative[G]): G[Gen[A]]
extension [G[_], A](ga: G[A])
inline def collectK[B[_]](inline f: A => Gen[B]): Gen[Compose2[G, B]]
extension [G[_], A[_]](gfa: G[Gen[A]])
inline def cosequenceK(implicit evidence$3: Functor[G]): Gen[Compose2[G, A]]
inline def distributeConst[B](inline f: Compose2[G, A] ~>#: B): Gen[Const[B]]
inline def distributeK[B[_]](inline f: FunctionK[Compose2[G, A], B]): Gen[B]