Some enum-like types cannot be guaranteed to have fixed number of instances known at compile-time (or at least they cannot have exhaustive pattern-matching).
It would be useful to define some interface which could mapping to/from them in the runtime (probably only with PartialTransformers).
Example which could be handled with such approach could be various customizations to scala.Enumeration (they might not work the best with what we use for sealed/Scala 3 enums/Java enums) or large, immutable (but build in the runtime) sets of values.
Some enum-like types cannot be guaranteed to have fixed number of instances known at compile-time (or at least they cannot have exhaustive pattern-matching).
It would be useful to define some interface which could mapping to/from them in the runtime (probably only with
PartialTransformer
s).Example which could be handled with such approach could be various customizations to
scala.Enumeration
(they might not work the best with what we use forsealed
/Scala 3enum
s/Javaenum
s) or large, immutable (but build in the runtime) sets of values.