`second`/`right` derived from `first`/`left`
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 28/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 领域
- backend
调研方向
The issue asks whether Strong and Choice can derive second and right from first and left, and whether PureScript’s lack of default type class implementations explains the current design. Start by reading the Strong and Choice definitions and their implementations; the issue names no files or tests. Done means establishing the design reason and whether changing the class definitions is viable.
由索引模型根据 Issue 内容生成。
描述
Is there any reason why Strong/Choice require second/right and not instead derive them from first/left?
secondBasedOnFirst :: forall p a b c. Strong p => p a b -> p (Tuple c a) (Tuple c b)
-- equivalent to `second`?
secondBasedOnFirst = dimap swap swap <<< first
where
swap :: forall x y. Tuple x y -> Tuple y x
swap (Tuple a b) = Tuple b a
rightBasedOnLeft :: forall p a b c. Choice p => p a b -> p (Either c a) (Either c b)
-- equivalent to `right`?
rightBasedOnLeft = dimap flip flip <<< left
where
flip :: forall x y. Either x y -> Either y x
flip (Left a) = Right a
flip (Right b) = Left b
Is this only because of lack of default type class member implementations feature in PureScript or is there any other reason?
- 主要语言
- PureScript
- 星标
- 34
- 派生
- 13
- 平均合并
- 3 天 10 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
purescript/purescript-profunctor 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
-
status: needs more info
难度 5/5 一周以上 新手友好度 25/100
purescript/purescript-profunctor#32 · 1 条评论 ·
-
type: enhancement
难度 5/5 一周以上 新手友好度 20/100
查看 purescript/purescript-profunctor 的全部 Issue
相似的 Issue
-
ManageSieve proxy: a backend's NO/BYE greeting is skipped as a capability line and reported as EOF未关闭bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
Mend: dependency security vulnerability
难度 2/5 1-3 小时 新手友好度 62/100
ManageIQ/manageiq-pods#1476 ·
维护者通常 1 天内回复
-
mcp: typed tool handlers lose wrapped JSON-RPC errors可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
modelcontextprotocol/go-sdk#1529 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
FinanceFlash/unvibecode#818 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100