Proposal: Add monadic instances

オープン
#54 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
活発
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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?
主要言語
PureScript
スター
17
フォーク
25
平均マージ
3日 10分
マージ済み PR(30日)
1

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

purescript/purescript-nonempty のほかの issue

purescript/purescript-nonempty の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。