-
Notifications
You must be signed in to change notification settings - Fork 531
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
Feature Request: toLabelledProduct #853
Comments
Are you referring to the |
yes, thanks for clarification. I am coming from a Python background and there I have the star * and doublestar ** tools for passing lists and dictionaries as function arguments respectively. With shapeless it seems we can already support * via |
Gotcha. Scala function types don't encode the names of their arguments, so unfortunately what you ask isn't possible. Scala methods do, but they have the limitation that they're not first class. If that isn't a problem for you, then you might be able to make some headway with |
I see. Yeah that is unfortunate, but if something like this could work with methods, I would love to have it how could the syntax look like? |
thanks a lot for the pointers! However for interfacing already defined normal functions with FromRecordArgs it seems we have to hope that the class is inheritable, or the methods defined on a trait, so that we can create our custom wrapper Is there also support for interfacing "normal" methods which are not inheritable in such a manner? |
No there isn't. |
thanks a lot this sounds like a However to the best of my knowledge such proxies are not well supported currently (haven't found a single satisfiable implementation out there for Scala). If you know about a proxy which could accomplish this, please drop me a line. |
One could imagine having a |
It could also work as a macro when passed a reference to a method or a literal function. |
Dear shapeless team,
having
toProduct
support for unnamed Hlist, it seems a natural request to have method liketoLabelledProduct
for named Hlist of records (like automatically derived byLabelledGeneric
)any plans on implementing this?
The text was updated successfully, but these errors were encountered: