Proposal: Add monadic instances

Đang mở
#54 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Sôi nổi
Lĩnh vực
backend

Hướng nghiên cứu

Read the existing NonEmpty type and its current typeclass instances to assess the proposed Apply, Applicative, Bind, and Monad support. The issue also asks how to test typeclass laws, including whether to use purescript-quickcheck-laws; completion would require a maintainer decision on the approach and tests for the resulting instances.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Motivation

The current NonEmpty type does not provide Apply, Applicative, Bind, or Monad instances. However, a monadic interface appears feasible under suitable constraints on the underlying type constructor f.

Haskell's NonEmpty provides a useful precedent for monadic composition. In PureScript, the implementation would need to account for the underlying f structure and preserve the expected ordering and behavior of the resulting values.

Questions
  1. Would the maintainers be open to adding these instances?
  2. What is the preferred approach for testing typeclass laws? Is it recommended to use purescript-quickcheck-laws in the repository's existing test suite, or is there another best practice for this?
Ngôn ngữ chính
PureScript
Star
17
Fork
25
Merge trung bình
3 ngày 10 phút
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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của purescript/purescript-nonempty

Tất cả issue của purescript/purescript-nonempty

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.