Add a Testable instance for Either
Chưa có ai nhận issue này.
Đá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
- 25/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
- testing
Hướng nghiên cứu
Start by reading the existing Testable instances in purescript-quickcheck and the Either type and note usage shown in the issue. Determine which instance or instances are needed to make Either String Unit usable with the testing machinery, then check the project’s tests for the expected behavior. Done means the instance supports the shown composition pattern and has tests covering it.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Result is not a very composable data type, which makes it clunky to work with. If we add a Testable instance for Either String Unit we can use the whole machinery around the Either type and make testing a much more pleasant experience.
Contrived example of pleasant experience:
p :: Array String -> Either String Unit
p a = do
i <- note "Couldn't find hello." (elemIndex "hello" a)
if mod i 2 > 0
then Left "hello isn't on an index divisible by two."
else Right unit
In my opinion this experience becomes pleasant because I can use do-notation, note and a load of other niceties.
If you think this is a good idea I can implement the instance(s) needed and make a PR.
- Ngôn ngữ chính
- PureScript
- Star
- 108
- Fork
- 42
- Merge trung bình
- 2 ngày 23 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-quickcheck
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
purescript/purescript-quickcheck#136 · 1 bình luận ·
-
Lazy List Arbitrary InstanceCó thể đã có người làm @eviefp đã nhận 2206 ngày trước. Đang mởtype: enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 20/100
purescript/purescript-quickcheck#111 · 2 bình luận · 2 reaction ·
-
type: documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 55/100
-
purs-0.15 type: breaking change
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
purescript/purescript-quickcheck#104 · 12 bình luận ·
-
ShrinkingĐang mởtype: enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
purescript/purescript-quickcheck#103 · 6 bình luận · 4 reaction ·
Tất cả issue của purescript/purescript-quickcheck
Issue tương tự
-
[prefer-expect-resolves] autofix leaves a stray ")" when the awaited expression is parenthesizedĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jest-community/eslint-plugin-jest#2052 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
johanhaleby/occurrent#1505 ·
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 72/100
jeanibarz/knowledge-base-mcp-server#1262 ·
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
future-agi/future-agi#4092 · 1 bình luận ·
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 82/100
Maintainer thường phản hồi trong vòng 1 ngày