Adding new fields across all subtypes when converting ADTs? #498
codesurf42
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
Hello, With the batch of changes merged and released yesterday it is possible to have something like: def convert(in: Foo) = in.into[Bar].withFieldConst(_.matching[Bar].b, 1).transform (see Scastie). The |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am wondering if this is currently somehow possible in Chimney (I have seen coproductInstance but this is for a single subtype handling) without rewriting every single case of ADT?
I really like the full ADT conversions and that kind of extensions could make them more handy to use.
Beta Was this translation helpful? Give feedback.
All reactions