enum icon indicating copy to clipboard operation
enum copied to clipboard

Support custom encoders

Open julienrf opened this issue 7 years ago • 2 comments

In this example: the custom Encoder is not picked by the derived Enum: https://scastie.scala-lang.org/SRPKX4kqRnSipERe6d6BuA

julienrf avatar Jul 03 '17 12:07 julienrf

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?

j1r1k avatar Dec 18 '19 10:12 j1r1k

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.

julienrf avatar Dec 18 '19 21:12 julienrf