Proposal: Add monadic instances

Ouverte
#54 4 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
35/100
Type d'issue
Fonctionnalité
Clarté
À clarifier
Activité
Active
Domaine
backend

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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?
Langage dominant
PureScript
Étoiles
17
Forks
25
Merge moyen
3 j 10 min
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

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de purescript/purescript-nonempty

Toutes les issues de purescript/purescript-nonempty

Issues similaires

Plus d'issues Backend & API Design

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.