DefinitionsPlatform

io.scalaland.chimney.internal.compiletime.DefinitionsPlatform
abstract class DefinitionsPlatform(using val quotes: Quotes) extends Definitions

Attributes

Graph
Supertypes
trait Definitions
class Object
trait Matchable
class Any

Members list

Type members

Inherited classlikes

final implicit protected class ArrayExprOps[A](arrayExpr: Expr[Array[A]])(implicit evidence$7: Type[A])

Attributes

Inherited from:
Exprs (hidden)
Supertypes
class Object
trait Matchable
class Any
final implicit protected class EitherExprOps[L, R](eitherExpr: Expr[Either[L, R]])(implicit evidence$9: Type[L], evidence$10: Type[R])

Attributes

Inherited from:
Exprs (hidden)
Supertypes
class Object
trait Matchable
class Any
protected object Existential

Attributes

Inherited from:
Existentials (hidden)
Supertypes
class Object
trait Matchable
class Any
protected object ExistentialExpr

Attributes

Inherited from:
Existentials (hidden)
Supertypes
class Object
trait Matchable
class Any
protected object ExistentialType

Attributes

Inherited from:
Existentials (hidden)
Supertypes
class Object
trait Matchable
class Any
protected object Expr extends ExprModule

Attributes

Inherited from:
ExprsPlatform (hidden)
Supertypes
trait ExprModule
class Object
trait Matchable
class Any
protected trait ExprModule

Attributes

Inherited from:
Exprs (hidden)
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Expr.type
final implicit protected class ExprOps[A](expr: Expr[A])(implicit evidence$1: Type[A])

Attributes

Inherited from:
Exprs (hidden)
Supertypes
class Object
trait Matchable
class Any
final protected class ExprPromise[From, A](usage: A, fromName: ExprPromiseName)(implicit evidence$1: Type[From])

Allow us to use Expr[A] before we would either: know how we would initiate it, or: what the final shape of a whole expression would be.

Allow us to use Expr[A] before we would either: know how we would initiate it, or: what the final shape of a whole expression would be.

In situations like '{ val a = sth; ${ useA('{ a }) } } you know both how a would be created as well as the shape of the final tree. In cases when you would e.g. use expression in some context-dependent derivation which could return Either[Expr[B], Expr[F[B]], ExprPromise allows you to calculate that result and THEN decide how to turn it into final Expr value.

Type parameters

A

type of the current result we created using Expr[From]

From

type of the promised expression

Attributes

Inherited from:
ExprPromises (hidden)
Supertypes
class Object
trait Matchable
class Any
protected object ExprPromise extends ExprPromiseModule

Attributes

Inherited from:
ExprPromisesPlatform (hidden)
Supertypes
class Object
trait Matchable
class Any
protected trait ExprPromiseModule

Attributes

Inherited from:
ExprPromises (hidden)
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ExprPromise.type
final implicit protected class Function1[A, B](function1Expr: Expr[A => B])(implicit evidence$2: Type[A], evidence$3: Type[B])

Attributes

Inherited from:
Exprs (hidden)
Supertypes
class Object
trait Matchable
class Any
final implicit protected class Function2[A, B, C](function2Expr: Expr[(A, B) => C])(implicit evidence$4: Type[A], evidence$5: Type[B], evidence$6: Type[C])

Attributes

Inherited from:
Exprs (hidden)
Supertypes
class Object
trait Matchable
class Any
final implicit protected class IterableExprOps[A](iterableExpr: Expr[Iterable[A]])(implicit evidence$15: Type[A])

Attributes

Inherited from:
Exprs (hidden)
Supertypes
class Object
trait Matchable
class Any
final implicit protected class IteratorExprOps[A](iteratorExpr: Expr[Iterator[A]])(implicit evidence$18: Type[A])

Attributes

Inherited from:
Exprs (hidden)
Supertypes
class Object
trait Matchable
class Any
final implicit protected class LeftExprOps[L, R](leftExpr: Expr[Left[L, R]])(implicit evidence$11: Type[L], evidence$12: Type[R])

Attributes

Inherited from:
Exprs (hidden)
Supertypes
class Object
trait Matchable
class Any
final implicit protected class ListPatternMatchCaseOps[To](cases: List[PatternMatchCase[To]])(implicit evidence$2: Type[To])

Attributes

Inherited from:
ExprPromises (hidden)
Supertypes
class Object
trait Matchable
class Any
final implicit protected class MapExprOps[K, V](mapExpr: Expr[Map[K, V]])(implicit evidence$16: Type[K], evidence$17: Type[V])

Attributes

Inherited from:
Exprs (hidden)
Supertypes
class Object
trait Matchable
class Any
final implicit protected class OptionExprOps[A](optionExpr: Expr[Option[A]])(implicit evidence$8: Type[A])

Attributes

Inherited from:
Exprs (hidden)
Supertypes
class Object
trait Matchable
class Any
final protected class PatternMatchCase[To](val someFrom: ??, val usage: Expr[To], val fromName: ExprPromiseName, val isCaseObject: Boolean)

When we decide that expression would be crated in patter-match binding, we would receive this wrapper around the results, which would ensure that definition is only used inside the scope and allow combining several cases into a single pattern matching.

When we decide that expression would be crated in patter-match binding, we would receive this wrapper around the results, which would ensure that definition is only used inside the scope and allow combining several cases into a single pattern matching.

Attributes

Inherited from:
ExprPromises (hidden)
Supertypes
class Object
trait Matchable
class Any
protected object PatternMatchCase extends PatternMatchCaseModule

Attributes

Inherited from:
ExprPromisesPlatform (hidden)
Supertypes
class Object
trait Matchable
class Any
protected trait PatternMatchCaseModule

Attributes

Inherited from:
ExprPromises (hidden)
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object PatternMatchCase.type
final protected class PrependDefinitionsTo[A](usage: A, defns: Vector[(ExprPromiseName, ExistentialExpr, DefnType)])

When we decide that promised expression would be used as val/lazy val/var/def, we receive this wrapper around the results, which would ensure that: initialization of a definition would happen before its use, you can only use the definition inside its scope.

When we decide that promised expression would be used as val/lazy val/var/def, we receive this wrapper around the results, which would ensure that: initialization of a definition would happen before its use, you can only use the definition inside its scope.

Attributes

Inherited from:
ExprPromises (hidden)
Supertypes
class Object
trait Matchable
class Any

Attributes

Inherited from:
ExprPromisesPlatform (hidden)
Supertypes
class Object
trait Matchable
class Any
protected trait PrependDefinitionsToModule

Attributes

Inherited from:
ExprPromises (hidden)
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object PrependDefinitionsTo.type
final implicit protected class RightExprOps[L, R](rightExpr: Expr[Right[L, R]])(implicit evidence$13: Type[L], evidence$14: Type[R])

Attributes

Inherited from:
Exprs (hidden)
Supertypes
class Object
trait Matchable
class Any
protected object Type extends TypeModule

Attributes

Inherited from:
TypesPlatform (hidden)
Supertypes
trait TypeModule
class Object
trait Matchable
class Any
protected trait TypeModule

Attributes

Inherited from:
Types (hidden)
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Type.type
final implicit protected class TypeOps[A](tpe: Type[A])

Attributes

Inherited from:
Types (hidden)
Supertypes
class Object
trait Matchable
class Any
final implicit protected class TypeStringOps[S <: String](tpe: Type[S])

Attributes

Inherited from:
Types (hidden)
Supertypes
class Object
trait Matchable
class Any

Inherited types

type >?<[L, U >: L] = Bounded[L, U]

Attributes

Inherited from:
Existentials (hidden)
type ?<[U] = UpperBounded[U]

Attributes

Inherited from:
Existentials (hidden)
type ?>[L] = LowerBounded[L]

Attributes

Inherited from:
Existentials (hidden)
type ?? = ExistentialType

Attributes

Inherited from:
Existentials (hidden)
final protected type Existential[F[_]] = Bounded[Nothing, Any, F]

Represents value with some existential type t both for Type[t] as well as F[t].

Represents value with some existential type t both for Type[t] as well as F[t].

Since Scala 3 removed a lot of cases for existential types we cannot just use Type[?] in shared code. Additionally, we might need to have something to prove that our Type[?] is has the same ? as some Value[?]. For that, this utility would be useful.

Attributes

Inherited from:
Existentials (hidden)
final protected type ExistentialExpr = Existential[Expr]

Convenient utility to represent Expr[?] with erased inner type with accompanying Type[?] of the same ?.

Convenient utility to represent Expr[?] with erased inner type with accompanying Type[?] of the same ?.

Attributes

Inherited from:
Existentials (hidden)
final protected type ExistentialType = Bounded[Nothing, Any]

Convenient utility to represent Type[?] with erased inner type, but without any accompanying value.

Convenient utility to represent Type[?] with erased inner type, but without any accompanying value.

Attributes

Inherited from:
Existentials (hidden)
final override protected type Expr[A] = Expr[A]

Platform-specific expression representation (c.Expr[A] in 2, scala.quoted.Expr[A] in 3

Platform-specific expression representation (c.Expr[A] in 2, scala.quoted.Expr[A] in 3

Attributes

Inherited from:
ExprsPlatform (hidden)
final override protected type ExprPromiseName = Symbol

In Scala 2 it's c.universe.TermName, in Scala 3 Symbol of a val

In Scala 2 it's c.universe.TermName, in Scala 3 Symbol of a val

Attributes

Inherited from:
ExprPromisesPlatform (hidden)
final override protected type Type[T] = Type[T]

Platform-specific type representation (c.WeakTypeTag[A] in 2, scala.quoted.Type[A] in 3)

Platform-specific type representation (c.WeakTypeTag[A] in 2, scala.quoted.Type[A] in 3)

Attributes

Inherited from:
TypesPlatform (hidden)

Value members

Inherited methods

protected def assertionFailed(assertion: String): Nothing

Throws AssertionFailed exception

Throws AssertionFailed exception

Attributes

Inherited from:
Results (hidden)
protected def reportError(errors: String): Nothing

Prints error at current macro expansion AND throw exception for aborting macro expansion

Prints error at current macro expansion AND throw exception for aborting macro expansion

Attributes

Inherited from:
ResultsPlatform (hidden)
protected def reportInfo(info: String): Unit

Prints info at current macro expansion - assume it can only be called once

Prints info at current macro expansion - assume it can only be called once

Attributes

Inherited from:
ResultsPlatform (hidden)

Givens

Givens

given quotes: Quotes

Implicits

Inherited implicits

final implicit protected def ArrayExprOps[A : Type](arrayExpr: Expr[Array[A]]): ArrayExprOps[A]

Attributes

Inherited from:
Exprs (hidden)
final implicit protected def EitherExprOps[L : Type, R : Type](eitherExpr: Expr[Either[L, R]]): EitherExprOps[L, R]

Attributes

Inherited from:
Exprs (hidden)
final implicit protected def ExprOps[A : Type](expr: Expr[A]): ExprOps[A]

Attributes

Inherited from:
Exprs (hidden)
implicit protected def ExprPromiseTraverse[From]: Traverse[[_] =>> ExprPromise[From, _$8]]

Attributes

Inherited from:
ExprPromises (hidden)
final implicit protected def Function1[A : Type, B : Type](function1Expr: Expr[A => B]): Function1[A, B]

Attributes

Inherited from:
Exprs (hidden)
final implicit protected def Function2[A : Type, B : Type, C : Type](function2Expr: Expr[(A, B) => C]): Function2[A, B, C]

Attributes

Inherited from:
Exprs (hidden)
final implicit protected def IterableExprOps[A : Type](iterableExpr: Expr[Iterable[A]]): IterableExprOps[A]

Attributes

Inherited from:
Exprs (hidden)
final implicit protected def IteratorExprOps[A : Type](iteratorExpr: Expr[Iterator[A]]): IteratorExprOps[A]

Attributes

Inherited from:
Exprs (hidden)
final implicit protected def LeftExprOps[L : Type, R : Type](leftExpr: Expr[Left[L, R]]): LeftExprOps[L, R]

Attributes

Inherited from:
Exprs (hidden)
final implicit protected def ListPatternMatchCaseOps[To : Type](cases: List[PatternMatchCase[To]]): ListPatternMatchCaseOps[To]

Attributes

Inherited from:
ExprPromises (hidden)
final implicit protected def MapExprOps[K : Type, V : Type](mapExpr: Expr[Map[K, V]]): MapExprOps[K, V]

Attributes

Inherited from:
Exprs (hidden)
final implicit protected def OptionExprOps[A : Type](optionExpr: Expr[Option[A]]): OptionExprOps[A]

Attributes

Inherited from:
Exprs (hidden)

Attributes

Inherited from:
ExprPromises (hidden)
final implicit protected def RightExprOps[L : Type, R : Type](rightExpr: Expr[Right[L, R]]): RightExprOps[L, R]

Attributes

Inherited from:
Exprs (hidden)
final implicit protected def TypeOps[A](tpe: Type[A]): TypeOps[A]

Attributes

Inherited from:
Types (hidden)
final implicit protected def TypeStringOps[S <: String](tpe: Type[S]): TypeStringOps[S]

Attributes

Inherited from:
Types (hidden)