You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for the awesome library! I'm using heaps of unions so this is a lifesaver. Would you consider upstreaming this to Scala3? I think this is a missing feature that really belongs in the standard lib.
The text was updated successfully, but these errors were encountered:
When Scala 3 was released, I also expected this functionality to be a part of the standard library. And I still think it should be available out of the box.
I see several issues with upstreaming the library.
It's relatively simple to derive a Show typeclass, but things are getting complicated with io.circe.Decoder. In some scenarios, the decoding logic should rely on the discriminators (e.g. https://circe.github.io/circe/codecs/adt.html#the-future).
In terms of derivation, a union type is somewhat similar to a sealed trait (ignoring that type Union = String | String is a valid definition).
Hence, with a few adjustments, it should be possible to derive a typeclass utilizing Mirror.SumOf (a few hints typelevel/shapeless-3#21 (comment)).
Once I formalize my ideas, I will make a proposition in dotty repository.
Hi, thanks for the awesome library! I'm using heaps of unions so this is a lifesaver. Would you consider upstreaming this to Scala3? I think this is a missing feature that really belongs in the standard lib.
The text was updated successfully, but these errors were encountered: