-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
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
Allow pattern matching on Schema for tuples, eithers #18
Comments
A hint getting started: final case class SchemaTuple2[A, B](left: Schema[A], right: Schema[B]) extends Schema[(A, B)]
final case class SchemaEither2[A, B](left: Schema[A], right: Schema[B]) extends Schema[Either[A, B]] This way, if you have a |
let me take this one |
jdegoes
pushed a commit
that referenced
this issue
Apr 5, 2021
* #16 Enhance codec with non-streaming methods * #18 added tuples and eithers * #18 formatted code * #18 added one failing test scenario * #18 introduced either schema also for json codec * #18 fixed json either encoding bug * #18 fixed nested products bugs * #18 fixed complex nested sum types * #18 formatted code * #18 removed unnecessary comments Co-authored-by: Damian Reeves <957246+DamianReeves@users.noreply.github.com>
jdegoes
pushed a commit
that referenced
this issue
Apr 20, 2021
* #16 Enhance codec with non-streaming methods * #18 added tuples and eithers * #18 formatted code * #18 added one failing test scenario * #18 introduced either schema also for json codec * #18 fixed json either encoding bug * #18 fixed nested products bugs * #18 fixed complex nested sum types * #18 formatted code * #18 removed unnecessary comments * Refactoring of protobuf decoder, sequence decoder bug fixes * rename test method Co-authored-by: Damian Reeves <957246+DamianReeves@users.noreply.github.com>
landlockedsurfer
pushed a commit
to landlockedsurfer/zio-schema
that referenced
this issue
May 28, 2022
* zio#16 Enhance codec with non-streaming methods * zio#18 added tuples and eithers * zio#18 formatted code * zio#18 added one failing test scenario * zio#18 introduced either schema also for json codec * zio#18 fixed json either encoding bug * zio#18 fixed nested products bugs * zio#18 fixed complex nested sum types * zio#18 formatted code * zio#18 removed unnecessary comments Co-authored-by: Damian Reeves <957246+DamianReeves@users.noreply.github.com>
landlockedsurfer
pushed a commit
to landlockedsurfer/zio-schema
that referenced
this issue
May 28, 2022
* zio#16 Enhance codec with non-streaming methods * zio#18 added tuples and eithers * zio#18 formatted code * zio#18 added one failing test scenario * zio#18 introduced either schema also for json codec * zio#18 fixed json either encoding bug * zio#18 fixed nested products bugs * zio#18 fixed complex nested sum types * zio#18 formatted code * zio#18 removed unnecessary comments * Refactoring of protobuf decoder, sequence decoder bug fixes * rename test method Co-authored-by: Damian Reeves <957246+DamianReeves@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tuples and eithers (products/sums) are so core to schema that we should bake them in and allow pattern matching against them, rather than encoding them atop Record / Enum.
The text was updated successfully, but these errors were encountered: