[Scala 3] Derivation for deeply nested types

未关闭
#473 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
scala
领域
devtools

调研方向

首先,将 Scala 3 的派生路径与使用 Shapeless's Split1 的 Scala 2 实现进行比较。复现 issue 中所示的嵌套 SemigroupK summon,并验证在不给 given 命名或显式调用 given 的情况下可以编译。

由索引模型根据 Issue 内容生成。

描述

Blocked/needs help Bug

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?

主要语言
Scala
星标
545
派生
66
平均合并
1 小时 39 分钟
30 天内合并 PR
2

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

typelevel/kittens 的其他 Issue

查看 typelevel/kittens 的全部 Issue

相似的 Issue

更多 Scala Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。