Add qualified do module for (semigroup) `V`

Aperta
#40 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Ambito
backend

Direzione di ricerca

Start by reading the existing Data.Validation.Semigroup module and how this repository organizes and tests modules. The issue proposes a Data.Validation.Semigroup.QualifiedDo module exposing bind as andThen; confirm the expected type and add coverage for using it with qualified do notation. Done when the module supports the proposed usage and the relevant tests pass.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The Data.Validation.Semigroup V does not have a Bind instance because it can lead to unexpected results despite it otherwise working fine. That makes sense, but when I do want that behavior, I can use andThen. Unfortunately, it means I can't use do notation anymore.

As a workaround, perhaps a module should be added to this repo which exposes the following module?

module Data.Validation.Semigroup.QualifiedDo

import Data.Validation.Semigroup (V, andThen)

bind :: -- type signature
bind = andThen

Then, when imported as import Data.Validation.Semigroup.QualifiedDo as V, we can use V.do. Since its qualified do notation, one is able to see that something 'special' is going on with the bind calls.

Lingua principale
PureScript
Stelle
45
Fork
13
Merge medio
2g 6h
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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di purescript/purescript-validation

Tutte le issue di purescript/purescript-validation

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.