Patch API differences
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- backend
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- PureScript
- Star
- 61
- Fork
- 50
- Merge trung bình
- 2 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của purescript/purescript-lists
-
ZipList is BindĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
purescript/purescript-lists#219 · 1 bình luận · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
purescript/purescript-lists#218 ·
-
Data.List.NonEmpty.intersect and Data.List.NonEmpty.intersectBy throw when intersection emptyCó thể đã có người làm @evaogbe đã nhận 1066 ngày trước. Đang mởgood first issue type: bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 1/100
purescript/purescript-lists#216 · 2 bình luận ·
-
type: enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
purescript/purescript-lists#197 · 1 bình luận ·
-
type: enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 24/100
purescript/purescript-lists#194 · 5 bình luận ·
Tất cả issue của purescript/purescript-lists
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
remove the use of `forget`Đang mởgood first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
milind-soni/OpenMausBot#5829 ·
Maintainer thường phản hồi trong vòng 1 ngày