We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It would be good to have an ability to alias mutliple derivations at once, so instead of etc
import com.sksamuel.avro4s.{Encoder, Decoder, SchemaFor} @derive(Encoder, Decoder, SchemaFor) case class FooBar(foo: String, bar: Int)
one can write (preferred)
@avro4sCodec case class FooBar(foo: String, bar: Int)
or
@derive(avro4sCodec) case class FooBar(foo: String, bar: Int)
The text was updated successfully, but these errors were encountered:
Some thoughts:
For example, the alias could be implemented as
import derevo.MultipleAlias class avro4sCodec extends MultipleAlias(Encoder, Decoder, SchemaFor)
or with type-builders like shapeless HList but for HK:
sealed trait Many[T <: Many[_]] trait T extends Many[Nothing] case class ::[A[_], Tail <: Many[_]]() extends Many[Tail] class deriveMany[T <: Many[_]]() extends scala.annotation.Annotation object example { type TypeClasses = List :: Option :: Vector :: T class alias extends deriveMany[example.TypeClasses] } // all forms are valid @example.alias @deriveMany[example.TypeClasses] @deriveMany[Either[String, *] :: Function[*, Int] :: T] case class FooBar(int: Int, str: String) println("compiles")
the latter compiles at scastie
Sorry, something went wrong.
Implemented in #333
No branches or pull requests
It would be good to have an ability to alias mutliple derivations at once, so instead of etc
one can write (preferred)
or
The text was updated successfully, but these errors were encountered: