Made

made.Made
See theMade companion trait
object Made

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Made.type

Members list

Type members

Classlikes

sealed trait Product extends Made

Mirror for product types (case classes and value classes).

Mirror for product types (case classes and value classes).

Produced by Made.derived when T is a case class, a zero-field case class, or a value class (extends AnyVal).

Elems is a tuple of MadeFieldElem representing each constructor parameter. GeneratedElems is a tuple of GeneratedMadeElem for any @generated members.

Attributes

See also
Supertypes
trait Made
class Object
trait Matchable
class Any
sealed trait Singleton extends Made

Mirror for singleton types (objects and Unit).

Mirror for singleton types (objects and Unit).

Produced by Made.derived when T is an object, Unit, or a singleton type.

Elems is fixed to EmptyTuple since singletons have no elements. The singleton instance is available via value.

Attributes

See also
Supertypes
trait Made
class Object
trait Matchable
class Any
sealed trait Sum extends Made

Mirror for sum types (sealed traits and enums).

Mirror for sum types (sealed traits and enums).

Produced by Made.derived when T is a sealed trait or enum.

Elems is a tuple of MadeSubElem and MadeSubSingletonElem representing the subtypes.

Attributes

See also
Supertypes
trait Made
class Object
trait Matchable
class Any
sealed trait Transparent extends Made

Mirror for transparent wrapper types (single-field case classes annotated with @transparent).

Mirror for transparent wrapper types (single-field case classes annotated with @transparent).

Produced by Made.derived when T is a case class annotated with @transparent having exactly one constructor field. @generated members are not supported on transparent types and will cause a compile error.

Attributes

See also
Supertypes
trait Made
class Object
trait Matchable
class Any

Types

type ExtractLabel[M] = M match { case LabelOf[label] => label }
type ExtractMeta[M] = M match { case MetaOf[meta] => meta }
type ExtractOf[M] = M match { case Of[t] => t }
type LabelOf[l <: String] = MadeElem { type Label = l; }
type MetaOf[m <: Tuple] = MadeElem { type Metadata = m; }
type Of[T] = Made { type Type = T; }
type ProductOf[T] = Product { type Type = T; }
type SingletonOf[T] = Singleton { type Type = T; }
type SumOf[T] = Sum { type Type = T; }
type TransparentOf[T] = Transparent { type Type = T; }

Givens

Givens

transparent inline given derived: [T] => Of[T]

Derives a Made mirror for T at compile time.

Derives a Made mirror for T at compile time.

The concrete subtype of the returned mirror is determined by the following derivation priority (first match wins):

  1. Singleton - T is an object, Unit, or a singleton type
  2. Transparent - T is annotated with @transparent (must have exactly one constructor field; @generated members are not allowed)
  3. Product - T is a value class (extends AnyVal)
  4. Product - T has a Mirror.ProductOf[T] (case classes)
  5. Sum - T has a Mirror.SumOf[T] (sealed traits, enums)

The return type is Made.Of[T] but the actual runtime type is the more specific subtype listed above.

Attributes

See also