Kind-Polymorphism and `Show`
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 28/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Bereich
- backend
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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?
- Vorherrschende Sprache
- PureScript
- Sterne
- 168
- Forks
- 90
- Ø Merge
- 3 T. 1 Std.
- Gemergte PRs (30 T.)
- 1
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus purescript/purescript-prelude
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 57/100
purescript/purescript-prelude#317 · 1 Reaktion ·
-
Int bottom is not safeOffen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 32/100
purescript/purescript-prelude#312 · 5 Kommentare ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
purescript/purescript-prelude#310 · 5 Kommentare ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 24/100
purescript/purescript-prelude#308 · 2 Kommentare ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
purescript/purescript-prelude#307 · 1 Kommentar · 1 Reaktion ·
Alle Issues in purescript/purescript-prelude
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
-
ManageSieve proxy: a backend's NO/BYE greeting is skipped as a capability line and reported as EOFOffenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
Mend: dependency security vulnerability
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
Mend: dependency security vulnerability
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
ManageIQ/manageiq-pods#1476 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
prime-radiant-inc/evener#6366 ·
Maintainer antworten meist innerhalb von 1 Tag