Gabriella439 / pipes

Compositional pipelines
BSD 3-Clause "New" or "Revised" License
487 stars 72 forks source link

Elaborate on the documentation for ListT #230

Closed chris-martin closed 3 years ago

chris-martin commented 3 years ago

This implements several of the documentation ideas I brought up in https://github.com/Gabriel439/Haskell-Pipes-Library/pull/184#issuecomment-825856215.

The present problem, I think, is that it is not obvious how to accomplish some basic ListT tasks (e.g. converting ListT m a to m [a]) unless you have the habit of knowing to convert to Producer first.

I also wanted to emphasize some of the things that you can do using just the typeclass instances.

I'm aiming to augment the ListT API documentation with just enough links and suggestions to serve as jumping-off points, without cluttering up the haddock page for the Pipes module too much.

Gabriella439 commented 3 years ago

Thank you! This is great 🙂

Gabriella439 commented 3 years ago

@chris-martin: Also, while you are here, I want to point out that if you are looking for a conceptually simpler ListT for pedagogical purposes, you might be interested in another package I created expressly for that purpose: https://hackage.haskell.org/package/list-transformer

chris-martin commented 3 years ago

@Gabriel439 Thanks, I actually just noticed that package a couple weeks ago and added a reference to it at the end of the ListT chapter. For a while considered recommending list-transformer instead of pipes. I ended up sticking with pipes because I do still want to advocate for producers+pipes+consumers, sort of using ListT as a stepping stone to get there.

Gabriella439 commented 3 years ago

Yeah, that sounds reasonable.

Also, the updated documentation is now on Hackage