Nested newtype wrapper vs Stream/StreamK Applicative and Monad instances
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Read the Stream and StreamK newtype wrappers and their Applicative, Monad, Semigroup, and MonadPlus instances in streamly-core. Compare the performance implications of bind association and append, and assess whether adding these instances or using explicit concatFor operations best addresses the concerns in the issue; the issue does not name files or tests, so first locate the relevant definitions.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Do we want MonadState, MonadReader etc instances in future for this type? If so we will need to depend on mtl - streamly-core currently does not depend on mtl. Or we will have to move these types to streamly instead of streamly-core.
Another option is - instead of using newtype wrappers we can merge these instances with the Stream and StreamK types. We can use the concatFor (bind) operations directly instead of Monad instance, but a Monad instance could be useful where it is used implicitly - e.g. MonadComprehensions. We did not add a Monad instance earlier to avoid the misuse of the monad instance. What are the potential misuses?
- We must not have Semigroup and MonadPlus instances for Stream type so it cannot be appended, append has quadratic complexity for Stream, though we can have it for StreamK which has a linear append.
- Left associating the binds in a chain could hurt performance - they should be explicitly right associated
- Applicative should be preferred as it would be much faster - maybe we can just provide an Applicative and leave the monad type composition to explicit concatFor (bind) operations.
- Lingua principale
- Haskell
- Stelle
- 926
- Fork
- 71
- Merge medio
- 6h 49m
- PR unite (30g)
- 3
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di composewell/streamly
-
takeInterval yields nothing, dropInterval drops nothingForse già presa @GuillaumedeVolpiano l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
composewell/streamly#3271 ·
-
Parser: many accepts input that ends inside an elementForse già presa @GuillaumedeVolpiano l’ha presa 1 giorno fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
composewell/streamly#3270 ·
-
aspect:api
Difficoltà 4/5 1-2 giorni Idoneità per principianti 48/100
composewell/streamly#3206 ·
-
api:breaking aspect:api aspect:filesystem
Difficoltà 4/5 1-2 giorni Idoneità per principianti 35/100
composewell/streamly#3203 ·
-
type:performance
Difficoltà 4/5 3-5 giorni Idoneità per principianti 32/100
composewell/streamly#3200 · 2 commenti ·
Tutte le issue di composewell/streamly
Issue simili
-
bug desktop
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
simplex-chat/simplex-chat#8291 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: C# programs with top-level statements fail to compileForse già presa @AsyncNigam l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
compiler-explorer/compiler-explorer#9625 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
needs triage type: enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 3 giorni
-
reflex-0.10Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
commercialhaskell/stackage#8180 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenZeppelin/canton-contracts#140 ·
I maintainer di solito rispondono entro 1 giorno