PrismMacro
dev.constructive.eo.generics.PrismMacro
object PrismMacro
Compile-time derivation of a Prism from a sum / enum / union type S to a direct child A a: S. Macro-time validation checks A is a direct child of S.
enum Shape:
case Circle(radius: Double)
case Square(side: Double)
val circleP = prism[Shape, Shape.Circle]
val intP = prism[Int | String, Int]
Attributes
- Source
- PrismMacro.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
PrismMacro.type
Members list
In this article