Proposal: Add monadic instances

Offen
#54 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Muss geklärt werden
Aktivitätsstatus
Aktiv
Bereich
backend

Rechercherichtung

Read the existing NonEmpty type and its current typeclass instances to assess the proposed Apply, Applicative, Bind, and Monad support. The issue also asks how to test typeclass laws, including whether to use purescript-quickcheck-laws; completion would require a maintainer decision on the approach and tests for the resulting instances.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Motivation

The current NonEmpty type does not provide Apply, Applicative, Bind, or Monad instances. However, a monadic interface appears feasible under suitable constraints on the underlying type constructor f.

Haskell's NonEmpty provides a useful precedent for monadic composition. In PureScript, the implementation would need to account for the underlying f structure and preserve the expected ordering and behavior of the resulting values.

Questions
  1. Would the maintainers be open to adding these instances?
  2. What is the preferred approach for testing typeclass laws? Is it recommended to use purescript-quickcheck-laws in the repository's existing test suite, or is there another best practice for this?
Vorherrschende Sprache
PureScript
Sterne
17
Forks
25
Ø Merge
3 T. 10 Min.
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-nonempty

Alle Issues in purescript/purescript-nonempty

Ähnliche Issues

Weitere Issues zu Backend & API Design

Neue Issues direkt in Ihr Postfach

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