Kind-Polymorphism and `Show`
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
- 28/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 discusses adding KindShow and a Show (Proxy a) instance in Type.Proxy; start by reading that module and the linked typelevel-peano example. Decide whether kind-level values can be shown through this API and what instance constraints would be needed. Done means the approach is settled and the issue has a concrete implementation scope.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
As of 0.14, the Proxy-Zoo should get reduced to just one: Proxy. This means that creating type-class instances for proxied values is no longer possible (as far as I know)
For example in typelevel-peano (https://github.com/csicar/purescript-typelevel-peano/pull/4/files#diff-7de00383917fea851d52cc5de4f18f87329b6b3f4e2819a8ebcbf9d8c0d85a80R47) I had a Show-Instance for typelevel Ints, that would print the value representation:
>>> instance showNat :: Show (IProxy a) where show = reflectInt
>>> show (IProxy :: IProxy N10)
10
I think it would be nice to have the same functionality for Proxy as well:
-- In Type.Proxy
class KindShow a where
kindShow :: Proxy a -> String
instance showkindShow :: (KindShow a) => Show (Proxy a) where
show a = kindShow a
---- In client
data Int
reflectInt = ...
instance show :: KindShow Int where
kindShow p = reflectInt p
Does that make sense? Is there an easier way?
- Ngôn ngữ chính
- PureScript
- Star
- 168
- Fork
- 90
- Merge trung bình
- 3 ngày 1 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-prelude
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 57/100
purescript/purescript-prelude#317 · 1 reaction ·
-
Int bottom is not safeĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 32/100
purescript/purescript-prelude#312 · 5 bình luận ·
-
add liftCompare & friendsĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
purescript/purescript-prelude#310 · 5 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 24/100
purescript/purescript-prelude#308 · 2 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
purescript/purescript-prelude#307 · 1 bình luận · 1 reaction ·
Tất cả issue của purescript/purescript-prelude
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
ManageSieve proxy: a backend's NO/BYE greeting is skipped as a capability line and reported as EOFĐang mở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
-
Mend: dependency security vulnerability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Mend: dependency security vulnerability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
ManageIQ/manageiq-pods#1476 ·
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
prime-radiant-inc/evener#6366 ·
Maintainer thường phản hồi trong vòng 1 ngày