Add qualified do module for (semigroup) `V`

Offen
#40 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Bereich
backend

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
PureScript
Sterne
45
Forks
13
Ø Merge
2 T. 6 Std.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

  • Kein Dockerfile und keine Docker-Compose-Datei
  • Hat eine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus purescript/purescript-validation

Alle Issues in purescript/purescript-validation

Ähnliche Issues

Weitere Issues zu Backend & API Design

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.