-
Notifications
You must be signed in to change notification settings - Fork 22
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
Would type classes mirroring shapeless.ops.(hlist|record)
be welcome?
#165
Comments
That's quite interesting. I think if we include them, they should be in a separate module. So far the strategy has been to add methods that work with polymorphic lambdas. How do you manage to cross compile if you're using a different data structure between Scala 2 / Scala 3? |
I have I should have clarified originally -- I don't intend to contribute everything to support cross-building, I'm happy to continue maintaining that compatibility layer for my own code. I was just thinking that having the |
Wow, that's very clever. I think it could be valuable to even to include the aliases in a separate compat module. |
I'm definitely open to including a compat module. To add another layer of complexity to this, I've discovered that As an example, I wrote a benchmark to test the inductive implicit encoding of
|
In that case it might be better to try and finally finish cross-compiling Shapeless 2 to Scala 3: milessabin/shapeless#1200 Or start from scratch with a less ambitious version. I think |
Generic from mirrors already exists in the Shapeless 2 for Scala 3 PR, so if something less ambitious is wanted, then one would just have to copy-paste that out. That's roughly what I did for a benchmark for my master thesis, and it worked just fine. IIRC the problem for a more general port was that the Scala 3 compiler didn't work well with some type programming stuff. |
I maintain an open source library at my company that has made it possible to cross-build a large, shapeless-heavy app for scala 2 and 3. Until recently I had just defined the minimal set of
ops
needed for my codebase, but I've been working on fleshing out the remaining ones and I'm nearly done (with a few exceptions that don't make sense anymore). I'd be happy to port my changes to this repo and open a pull request if it would be received well!These use
scala.Tuple
directly instead of defining a separateHList
type. It would cover theops
here:as well as the syntax that uses those
ops
here:The text was updated successfully, but these errors were encountered: