Add a Testable instance for Either
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 25/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Domaine
- testing
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- PureScript
- Étoiles
- 108
- Forks
- 42
- Merge moyen
- 2 j 23 h
- PR mergées (30 j)
- 1
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Aucun guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de purescript/purescript-quickcheck
-
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
purescript/purescript-quickcheck#136 · 1 commentaire ·
-
Lazy List Arbitrary InstancePeut-être pris @eviefp l’a pris il y a 2207 jours. Ouvertetype: enhancement
Difficulté 3/5 1-2 jours Accessibilité débutants 20/100
purescript/purescript-quickcheck#111 · 2 commentaires · 2 réactions ·
-
type: documentation
Difficulté 1/5 Moins d'une heure Accessibilité débutants 55/100
-
purs-0.15 type: breaking change
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 20/100
purescript/purescript-quickcheck#104 · 12 commentaires ·
-
ShrinkingOuvertetype: enhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 15/100
purescript/purescript-quickcheck#103 · 6 commentaires · 4 réactions ·
Toutes les issues de purescript/purescript-quickcheck
Issues similaires
-
[prefer-expect-resolves] autofix leaves a stray ")" when the awaited expression is parenthesizedOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
jest-community/eslint-plugin-jest#2052 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
johanhaleby/occurrent#1505 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
jeanibarz/knowledge-base-mcp-server#1262 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
future-agi/future-agi#4092 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour