CommonDerivation

magnolia1.CommonDerivation
trait CommonDerivation[TypeClass[_]]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Derivation[TypeClass]
trait AutoDerivation[TypeClass]
trait ProductDerivation[TypeClass]

Members list

Type members

Types

type Typeclass[T] = TypeClass[T]

Value members

Abstract methods

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.

Value parameters

caseClass

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

Attributes

Concrete 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]]
inline def derivedMirrorProduct[A](product: ProductOf[A]): TypeClass[A]
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]]
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]]