haskell / haskell/mtl

Add `MonadYield`

Open
#170 21 comments 1 reaction 0 assignees View on GitHub
transformers
Dominant language
Haskell
Stars
401
Forks
72
PR merge metrics
No merged PRs in 30d

Description

```haskell
class (Monad m) => MonadYield o m | m -> o where
yield :: o -> m ()
```

[pipes](https://hackage.haskell.org/package/pipes) and [conduit](https://hackage.haskell.org/package/conduit) could have instances. It shouldn't be added here however until another more basic instance exists in transformers, which would be useful anyway since those two packages require mmorph and mono-traversable, respectively. Consider this issue also a discussion for the transformers instance.

@snoyberg has opined about the need for a more central streaming abstraction in [this blog post](https://www.snoyman.com/blog/2020/12/haskell-bad-parts-3/). What are people's thoughts about a streaming type in the core libraries? In base?

cc @Gabriella439

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.