Skip to content
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

[Scala 3] Derivation for deeply nested types #473

Open
Tracked by #481
TimWSpence opened this issue May 23, 2022 · 2 comments
Open
Tracked by #481

[Scala 3] Derivation for deeply nested types #473

TimWSpence opened this issue May 23, 2022 · 2 comments

Comments

@TimWSpence
Copy link
Member

TimWSpence commented May 23, 2022

In scala 2, the following is ok:

import auto.semigroupK._
implicitly[SemigroupK[Lambda[x => List[Set[Option[x]]]]]]

but the following in scala 3 does not compile:

import auto.semigroupK.given
summon[SemigroupK[[x] =>> List[Set[Option[x]]]]]

Naming and explicitly calling

given foo[F[_], G[_]](using F: Or[F]): DerivedSemigroupK[[x] =>> F[G[x]]] =
  F.unify.compose[G]

foo[List, [x] =>> Set[Option[x]]]

does work however.

I see the scala 2 version uses Split1 from Shapeless. Maybe we need something similar here?

@joroKr21
Copy link
Member

Oh no, definitely no Split1 😂 - that is a horrible hack.
But worth it to investigate why it's not compiling 🤔

@TimWSpence TimWSpence changed the title (Scala 3) Derivation for deeply nested types [Scala 3] Derivation for deeply nested types May 24, 2022
@TimWSpence
Copy link
Member Author

This is currently being tracked in scala/scala3#15344 but we are unable to support it for the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants