[Scala 3] Derivation for deeply nested types
Open
Nobody has claimed this yet.
Blocked/needs help
Bug
- Dominant language
- Scala
- Stars
- 545
- Forks
- 66
- Avg merge
- 26m
- Merged PRs (30d)
- 2
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the Scala 3 derivation path with the Scala 2 implementation that uses Shapeless's Split1. Reproduce the nested SemigroupK summon shown in the issue and verify that it compiles without naming or explicitly calling a given.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100