Add a Testable instance for Either
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Ambito
- testing
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- PureScript
- Stelle
- 108
- Fork
- 42
- Merge medio
- 2g 23h
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di purescript/purescript-quickcheck
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
purescript/purescript-quickcheck#136 · 1 commento ·
-
Lazy List Arbitrary InstanceForse già presa @eviefp l’ha presa 2206 giorni fa. Apertatype: enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 20/100
purescript/purescript-quickcheck#111 · 2 commenti · 2 reazioni ·
-
type: documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 55/100
-
purs-0.15 type: breaking change
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
purescript/purescript-quickcheck#104 · 12 commenti ·
-
ShrinkingApertatype: enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
purescript/purescript-quickcheck#103 · 6 commenti · 4 reazioni ·
Tutte le issue di purescript/purescript-quickcheck
Issue simili
-
[prefer-expect-resolves] autofix leaves a stray ")" when the awaited expression is parenthesizedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
jest-community/eslint-plugin-jest#2052 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
johanhaleby/occurrent#1505 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
jeanibarz/knowledge-base-mcp-server#1262 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
future-agi/future-agi#4092 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno