Skip to content

Commit

Permalink
Changes to whitespace in signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Jan 23, 2025
1 parent 4d95d6a commit 492ae7d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/core/adversaria.Adversaria.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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.*

Expand All @@ -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.*

Expand All @@ -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.*

Expand All @@ -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.*

Expand Down
6 changes: 3 additions & 3 deletions src/core/adversaria.Annotations.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ case class Annotations[AnnotationType <: StaticAnnotation, TargetType](annotatio

object Annotations:
inline given[AnnotationType <: StaticAnnotation, TargetType]
: Annotations[AnnotationType, TargetType] =
: Annotations[AnnotationType, TargetType] =

${Adversaria.typeAnnotations[AnnotationType, TargetType]}

transparent inline def field[TargetType](inline lambda: TargetType => Any): List[StaticAnnotation] =
${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]}
4 changes: 2 additions & 2 deletions src/core/adversaria.CaseField.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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]

Expand Down

0 comments on commit 492ae7d

Please sign in to comment.