enum
enum copied to clipboard
Support custom encoders
In this example: the custom Encoder is not picked by the derived Enum: https://scastie.scala-lang.org/SRPKX4kqRnSipERe6d6BuA
Works when you make an instance of Encoder.Derived instead of Encoder (see https://scastie.scala-lang.org/K8JzCDUPQayyHDoNpA6CUA). I don't really understand the purpose of Dervied extends Encoder type. Maybe Encoder on its own would be enough?
Off the top of my head, I don’t remember in which case exactly, but sometimes it is useful to have a type-level distinction between types whose instances can be derived and types that can’t.