Skip to content

Commit

Permalink
Provide type alias for Scala 3.5-style
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Jun 10, 2024
1 parent 5ee9a02 commit b33fbe5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/wisteria.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ import scala.deriving.*
type Reflection[DerivationType] = Mirror.Of[DerivationType]
type ProductReflection[DerivationType <: Product] = Mirror.ProductOf[DerivationType]
type SumReflection[DerivationType] = Mirror.SumOf[DerivationType]

type Derivable[DerivationType <: { type Self }] =
Derivation[[SelfType] =>> DerivationType { type Self = SelfType }]

type ProductDerivable[DerivationType <: { type Self }] =
ProductDerivation[[SelfType] =>> DerivationType { type Self = SelfType }]

0 comments on commit b33fbe5

Please sign in to comment.