From b33fbe594ae995cff28432f9012ed5edc109f2d5 Mon Sep 17 00:00:00 2001 From: Jon Pretty Date: Mon, 10 Jun 2024 08:08:16 +0200 Subject: [PATCH] Provide type alias for Scala 3.5-style --- src/core/wisteria.scala | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/wisteria.scala b/src/core/wisteria.scala index f377151..c19ca41 100644 --- a/src/core/wisteria.scala +++ b/src/core/wisteria.scala @@ -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 }]