Add a Testable instance for Either
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Bereich
- testing
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- PureScript
- Sterne
- 108
- Forks
- 42
- Ø Merge
- 2 T. 23 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-quickcheck
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
purescript/purescript-quickcheck#136 · 1 Kommentar ·
-
Lazy List Arbitrary InstanceEvtl. vergeben @eviefp hat das vor 2207 Tagen übernommen. Offentype: enhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 20/100
purescript/purescript-quickcheck#111 · 2 Kommentare · 2 Reaktionen ·
-
type: documentation
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 55/100
-
purs-0.15 type: breaking change
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 20/100
purescript/purescript-quickcheck#104 · 12 Kommentare ·
-
ShrinkingOffentype: enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 15/100
purescript/purescript-quickcheck#103 · 6 Kommentare · 4 Reaktionen ·
Alle Issues in purescript/purescript-quickcheck
Ähnliche Issues
-
[prefer-expect-resolves] autofix leaves a stray ")" when the awaited expression is parenthesizedOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
jest-community/eslint-plugin-jest#2052 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
johanhaleby/occurrent#1505 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
jeanibarz/knowledge-base-mcp-server#1262 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
future-agi/future-agi#4092 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag