Impossible to create an instance of the Costrong class
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Bereich
- backend
Rechercherichtung
Start by reading the Costrong class and its unfirst method; the issue gives no file or test paths, so locate them in the repository. Compare the strict definition with the proposed Lazy constraint and consider the naming or library scope raised in the issue. Done means establishing whether the proposed approach is viable and agreeing on the API direction.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
The reason that Function and other types cannot be an instance of Costrong is that PureScript is a strict evaluation.
unfirst :: forall a b c. p (Tuple a c) (Tuple b c) -> p a b
That is, when we want to loop over c, it is impossible to set the initial value of c
How to modify it may be debatable, but I found the following solution
unfirstLazy :: forall a b c. Lazy c => p (Tuple a c) (Tuple b c) -> p a b
unfirstLazy f a = fst $ f $ Tuple a $ go
where
go = snd $ f $ Tuple a $ defer \_ -> go
Also, since this is not "Co" Strong, it might be better to name the class differently, for example CostrongLazy, or create a new library.
Thanks to natefaubion for sharing this issue on PureScript discord server.
- Vorherrschende Sprache
- PureScript
- Sterne
- 34
- Forks
- 13
- Ø Merge
- 3 T. 10 Min.
- 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-profunctor
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 28/100
purescript/purescript-profunctor#49 · 1 Kommentar ·
-
Add `Mux` and `Demux`Offenstatus: needs more info
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
purescript/purescript-profunctor#32 · 1 Kommentar ·
-
Add Choice CostarOffentype: enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 20/100
Alle Issues in purescript/purescript-profunctor
Ä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