diff --git a/src/core/adversaria.Adversaria.scala b/src/core/adversaria.Adversaria.scala index bc8f6ad..300ebce 100644 --- a/src/core/adversaria.Adversaria.scala +++ b/src/core/adversaria.Adversaria.scala @@ -26,7 +26,7 @@ import language.experimental.captureChecking object Adversaria: def firstField[TargetType <: Product: Type, AnnotationType <: StaticAnnotation: Type](using Quotes) - : Expr[CaseField[TargetType, AnnotationType]] = + : Expr[CaseField[TargetType, AnnotationType]] = import quotes.reflect.* @@ -44,7 +44,7 @@ object Adversaria: . head def fields[TargetType <: Product: Type, AnnotationType <: StaticAnnotation: Type](using Quotes) - : Expr[List[CaseField[TargetType, AnnotationType]]] = + : Expr[List[CaseField[TargetType, AnnotationType]]] = import quotes.reflect.* @@ -65,7 +65,7 @@ object Adversaria: Expr.ofList(elements) def fieldAnnotations[TargetType: Type](lambda: Expr[TargetType => Any])(using Quotes) - : Expr[List[StaticAnnotation]] = + : Expr[List[StaticAnnotation]] = import quotes.reflect.* @@ -84,7 +84,7 @@ object Adversaria: case '{ $annotation: StaticAnnotation } => annotation def typeAnnotations[AnnotationType <: StaticAnnotation: Type, TargetType: Type](using Quotes) - : Expr[Annotations[AnnotationType, TargetType]] = + : Expr[Annotations[AnnotationType, TargetType]] = import quotes.reflect.* diff --git a/src/core/adversaria.Annotations.scala b/src/core/adversaria.Annotations.scala index 7fc41a4..106c214 100644 --- a/src/core/adversaria.Annotations.scala +++ b/src/core/adversaria.Annotations.scala @@ -26,7 +26,7 @@ case class Annotations[AnnotationType <: StaticAnnotation, TargetType](annotatio object Annotations: inline given[AnnotationType <: StaticAnnotation, TargetType] - : Annotations[AnnotationType, TargetType] = + : Annotations[AnnotationType, TargetType] = ${Adversaria.typeAnnotations[AnnotationType, TargetType]} @@ -34,11 +34,11 @@ object Annotations: ${Adversaria.fieldAnnotations[TargetType]('lambda)} transparent inline def fields[TargetType <: Product, AnnotationType <: StaticAnnotation] - : List[CaseField[TargetType, AnnotationType]] = + : List[CaseField[TargetType, AnnotationType]] = ${Adversaria.fields[TargetType, AnnotationType]} transparent inline def firstField[TargetType <: Product, AnnotationType <: StaticAnnotation] - : CaseField[TargetType, AnnotationType] = + : CaseField[TargetType, AnnotationType] = ${Adversaria.firstField[TargetType, AnnotationType]} diff --git a/src/core/adversaria.CaseField.scala b/src/core/adversaria.CaseField.scala index 0421349..1479be3 100644 --- a/src/core/adversaria.CaseField.scala +++ b/src/core/adversaria.CaseField.scala @@ -24,7 +24,7 @@ import language.experimental.captureChecking object CaseField: def apply[TargetType <: Product, AnnotationType <: StaticAnnotation, InitFieldType] (name: Text, access: TargetType -> InitFieldType, annotation: AnnotationType) - : CaseField[TargetType, AnnotationType] { type FieldType = InitFieldType } = + : CaseField[TargetType, AnnotationType] { type FieldType = InitFieldType } = inline def annotation0 = annotation @@ -34,7 +34,7 @@ object CaseField: def annotation: AnnotationType = annotation0 transparent inline given[TargetType <: Product, AnnotationType <: StaticAnnotation] - : CaseField[TargetType, AnnotationType] = + : CaseField[TargetType, AnnotationType] = Annotations.firstField[TargetType, AnnotationType]