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
I have a case class with a lot of members that yields well to generating an Arbitrary instance using scalacheck-shapeless, but some individual field values I'd like to discard as invalid.
For that purpose, I wanted to generate the instance using this library, call filter on it and make the result of that implicit.
I couldn't find anything in the documentation explaining how to generate an instance without making it implicit.
I have a case class with a lot of members that yields well to generating an
Arbitrary
instance using scalacheck-shapeless, but some individual field values I'd like to discard as invalid.For that purpose, I wanted to generate the instance using this library, call
filter
on it and make the result of thatimplicit
.I couldn't find anything in the documentation explaining how to generate an instance without making it implicit.
After some trial and error, I came up with:
Is there a better way I'm missing?
If yes, it should be added to the documentation.
If not, this seems useful and can be implemented (see
semiauto
generic derivation in Circe as an example).The text was updated successfully, but these errors were encountered: