Patch API differences
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 20/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 領域
- backend
研究方向
The issue points to proposed API details in issue comment 825460643 and lists instance and function differences across the Basic, Lazy, NonEmpty, and LazyNonEmpty list modules. Start by reading that linked comment and comparing the modules against the listed gaps; the issue says the function review is still incomplete. Done means resolving which API differences should be addressed and completing the agreed changes; linked pull request #199 is already open.
由索引模型根據 Issue 內容生成。
描述
See https://github.com/purescript/purescript-lists/issues/183#issuecomment-825460643 for a proposed API
It looks like there are a few missing functions and instances across the different list modules in this library. To tackle this more systematically, I found the contents of each of the cells of a 4-way Venn diagram created by comparing the following modules:
- Basic (List)
- Lazy[List]
- NonEmpty[List]
- LazyNonEmpty[List]
I've only looked over the instances so far. These appear to be the gaps:
Lazymissing fromLazyNonEmptyListEq1,Ord1missing fromNonEmptyList,LazyNonEmptyListFoldable1,Traversable1missing fromLazyNonEmptyList
Here are some notes on the remaining differences, which appear to be fine:
- Missing from
*NonEmptyListMonoid - Needs empty Plus - Needs empty Alternative - Needs Plus MonadZero - Needs Alternative MonadPlus - Needs MonadZero Unfoldable - Only if you can produce an empty container Comonadis only in*NonEmptyList, since you can'textractsomething from an empty list.- Only non-basic lists need the
Newtypeconvenience wrapper.
I still need to look through the functions. Feel free to help me flag or dismiss any of those differences.
Here's a brief explanation of how to read an entry in the listing of cells. For example in this entry:
-----
LazyNonEmpty NonEmpty
-----
Comonad
It means that Comonad appears only in LazyNonEmpty and NonEmpty, but not in any other modules. More specifically, Comonad is the output of:
intersections [LazyNonEmpty, NonEmpty] `difference` unions [Basic, NonEmpty]
This diagram might help with visualizing the "cells":
Here's the full listing (empty cells omitted).
Instances:
-----
Lazy LazyNonEmpty Basic NonEmpty
-----
Alt
Applicative
Apply
Bind
Eq
Extend
Foldable
FoldableWithIndex
Functor
FunctorWithIndex
Monad
Ord
Semigroup
Show
Traversable
TraversableWithIndex
Unfoldable1
-----
Lazy LazyNonEmpty NonEmpty
-----
Newtype
-----
LazyNonEmpty NonEmpty
-----
Comonad
-----
NonEmpty
-----
Foldable1
Traversable1
-----
Lazy Basic
-----
Alternative
Eq1
MonadPlus
MonadZero
Monoid
Ord1
Plus
Unfoldable
-----
Lazy
-----
Lazy
Functions:
-----
Lazy LazyNonEmpty Basic NonEmpty
-----
concatMap
fromFoldable
head
init
last
length
singleton
tail
toUnfoldable
uncons
-----
Lazy Basic NonEmpty
-----
(!!), index
catMaybes
concat
drop
dropWhile
elemIndex
elemLastIndex
filter
filterM
findIndex
findLastIndex
foldM
group
groupBy
insertAt
intersect
intersectBy
mapMaybe
modifyAt
nub
nubBy
partition
reverse
snoc
span
take
takeWhile
union
unionBy
unzip
updateAt
zip
zipWith
zipWithA
-----
Basic NonEmpty
-----
group'
mapWithIndex
sort
sortBy
unsnoc
-----
LazyNonEmpty NonEmpty
-----
appendFoldable
fromList
toList
-----
NonEmpty
-----
cons
cons'
snoc'
-----
Lazy Basic
-----
(..), range
(\\), difference
Pattern(..)
alterAt
delete
deleteAt
deleteBy
insert
insertBy
many
null
slice
some
stripPrefix
transpose
-----
Basic
-----
dropEnd
manyRec
someRec
takeEnd
-----
Lazy LazyNonEmpty
-----
iterate
repeat
-----
Lazy
-----
cycle
foldrLazy
replicate
replicateM
scanrLazy
- 主要語言
- PureScript
- 星號
- 61
- 分支
- 50
- 平均合併
- 2 天 6 小時
- 30 天內合併 PR
- 1
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
purescript/purescript-lists 的其他 Issue
-
ZipList is Bind未關閉
難度 4/5 3-5 天 新手友好度 35/100
purescript/purescript-lists#219 · 1 則留言 · 1 個 reaction ·
-
難度 2/5 1-3 小時 新手友好度 48/100
purescript/purescript-lists#218 ·
-
Data.List.NonEmpty.intersect and Data.List.NonEmpty.intersectBy throw when intersection empty可能已有人在做 @evaogbe 於 1066 天前認領。 未關閉good first issue type: bug
難度 4/5 3-5 天 新手友好度 1/100
purescript/purescript-lists#216 · 2 則留言 ·
-
type: enhancement
難度 4/5 3-5 天 新手友好度 25/100
purescript/purescript-lists#197 · 1 則留言 ·
-
type: enhancement
難度 5/5 一週以上 新手友好度 24/100
purescript/purescript-lists#194 · 5 則留言 ·
查看 purescript/purescript-lists 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 62/100
-
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 小時 新手友好度 65/100
-
Mend: dependency security vulnerability
難度 2/5 1-3 小時 新手友好度 62/100
ManageIQ/manageiq-pods#1476 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
prime-radiant-inc/evener#6366 ·
維護者通常 1 天內回覆