Skip to content
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

General derivation support for Newtype and Subtype #794

Open
soujiro32167 opened this issue Nov 7, 2021 · 0 comments
Open

General derivation support for Newtype and Subtype #794

soujiro32167 opened this issue Nov 7, 2021 · 0 comments

Comments

@soujiro32167
Copy link

soujiro32167 commented Nov 7, 2021

Using the derive function, I was able to derive instances for zio-json and zio-config on subtypes and newtypes:

object ST extends Subtype[Int] {
  implicit val desc: zio.config.Descriptor[Type] = derive
  implicit val codec: zio.json.JsonCodec[Type] = derive
}
type ST = ST.Type

However, when I import newtypes or subtypes from external projects, I no longer have the ability to derive typeclasses for them

soujiro32167 added a commit to soujiro32167/zio-prelude that referenced this issue Feb 16, 2022
soujiro32167 added a commit to soujiro32167/zio-prelude that referenced this issue Feb 16, 2022
soujiro32167 added a commit to soujiro32167/zio-prelude that referenced this issue Feb 17, 2022
soujiro32167 added a commit to soujiro32167/zio-prelude that referenced this issue Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant