ProductDerivation

magnolia1.ProductDerivation
trait ProductDerivation[TypeClass[_]] extends CommonDerivation[TypeClass]

Attributes

Graph
Supertypes
trait CommonDerivation[TypeClass]
class Object
trait Matchable
class Any

Members list

Concise view

Type members

Inherited types

type Typeclass[T] = TypeClass[T]

Attributes

Inherited from:
CommonDerivation

Value members

Concrete methods

inline def derivedMirror[A](using mirror: Of[A]): TypeClass[A]

Inherited methods

inline def `getParams__`[T, Labels <: Tuple, Params <: Tuple](annotations: Map[String, List[Any]], inheritedAnnotations: Map[String, List[Any]], typeAnnotations: Map[String, List[Any]], repeated: Map[String, Boolean], defaults: Map[String, Option[() => Any]], idx: Int): List[Param[Typeclass, T]]

Attributes

Inherited from:
CommonDerivation
inline def derivedMirrorProduct[A](product: ProductOf[A]): TypeClass[A]

Attributes

Inherited from:
CommonDerivation
inline def getParams[T, Labels <: Tuple, Params <: Tuple](annotations: Map[String, List[Any]], typeAnnotations: Map[String, List[Any]], repeated: Map[String, Boolean], idx: Int): List[Param[Typeclass, T]]

Attributes

Inherited from:
CommonDerivation
inline def getParams_[T, Labels <: Tuple, Params <: Tuple](annotations: Map[String, List[Any]], inheritedAnnotations: Map[String, List[Any]], typeAnnotations: Map[String, List[Any]], repeated: Map[String, Boolean], idx: Int): List[Param[Typeclass, T]]

Attributes

Inherited from:
CommonDerivation
def join[T](caseClass: CaseClass[Typeclass, T]): TypeClass[T]

Must be implemented by the user of Magnolia to construct a typeclass for case class T using the provided type info. E.g. if we are deriving Show[T] typeclasses, and T is a case class Foo(...), we need to constuct Show[Foo].

Must be implemented by the user of Magnolia to construct a typeclass for case class T using the provided type info. E.g. if we are deriving Show[T] typeclasses, and T is a case class Foo(...), we need to constuct Show[Foo].

This method is called 'join' because typically it will join together the typeclasses for all the parameters of the case class, into a single typeclass for the case class itself. The field CaseClass.params can provide useful information for doing this.

Attributes

caseClass

information about the case class T, its parameters, and their typeclasses

Inherited from:
CommonDerivation

Givens

Givens

inline given derived[A](using Of[A]): TypeClass[A]