Cary Robbins
Cary Robbins
There's also the [scalaz-deriving](https://github.com/scalaz/scalaz-deriving#deriving) plugin which does something similar. Example quoted from the readme - > ```scala > @newtype > @deriving(Encoder, Decoder) > case class Bar(s: String) > ``` >...
It seems one workaround would be to use Coercible (special thanks to @hmemcpy for pointing this out to others) ```scala implicit def coercibleMeta[R, N](implicit ev: Coercible[Meta[R], Meta[N]], R: Meta[R]): Meta[N]...
I actually have a wip branch ([10-as-array](https://github.com/estatico/scala-newtype/tree/10-as-array)) which improves Array support for newtypes. At this point though, you should be fine to cast so long as you know that the...
The compelling use case for this is for users who do not wish to have a runtime dependency on newtype (e.g. for a library). There are some risks though as...
First, thanks for the PR and I appreciate your patience waiting on me to finally get around to commenting on it! :smiley: While I like the spirit of this change,...
/cc @joroKr21 The encoding of the newtype macros in v0.4.0 now allow for `asInstanceOf` casting by having the `Base` and `Tag` types extend `Any`, but of course **this must be...
I think we might be able to now support `.coerce` for Arrays. Should probably do extensive testing to ensure the current encoding won't blow up on us. If that's the...
I did something similar, but not quite as efficient - https://gist.github.com/carymrobbins/d0b900257cadb458b3de9b1b532cb2b3 I had played with a few approaches and this one seems to work best. However, I'm not sure exactly...
I believe my PR #188 (which has been merged to master) should take care of this issue. I am currently in the process of experimenting with it in my own...
You could also make an "example" plugin as a subproject and run the verifier on that.