Split Semiring into Semiring and Dioid

Aperta
#305 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Ambito
backend

Direzione di ricerca

The proposal concerns the Semiring type class in purescript-prelude; start by reading its current definition and the five comments on this issue. The discussion asks whether to move zero and one into Dioid, but does not settle the design or name affected files. Done would require a decided design and agreement on how the breaking change and biproduct generalization should work.

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

Descrizione

From @mikesol in Discord:

Would it make sense to revamp Semiring so that it had only the operators add and mul and then use Dioid for zero and one? There is some precedent for that: https://en.m.wikipedia.org/wiki/Semiring. It would create a nice symmetry between semigroup/monoid/group and semiring/dioid/ring. It'd be a breaking change for folks using zero and one, but otherwise I think it wouldn't be too disruptive. Also, it would allow for the generalization of semiring to an analogous biproduct class, which now isn't possible because zero and one necessarily leave out all but one of the types in the biproduct or biCCC class. Thoughts?

Lingua principale
PureScript
Stelle
168
Fork
90
Merge medio
3g 1h
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-prelude

Tutte le issue di purescript/purescript-prelude

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.