typelevel / cats

Lightweight, modular, and extensible library for functional programming.
https://typelevel.org/cats/
Other
5.25k stars 1.21k forks source link

Add StateT and trampolining to State documentation #387

Open ceedubs opened 9 years ago

ceedubs commented 9 years ago

Documentation for State was added in #384. However, it still has a TODO at the end for documenting how StateT relates to State and how/why trampolining is used for State. This TODO should be replaced with documentation.

LukaJCB commented 7 years ago

Maybe we should explain the concept of Monad Transformers at some sort of central location? Some of the motivation and explanation already exists in the OptionT documentation. We could take some of that and make some sort of Monad Transformer section, or we duplicate some of the documentation, which I'd personally also be okay with.

Another thought I have, is that cats-mtl is going to be a different package soon AFAIK, so there might also be some duplication there.

edmundnoble commented 7 years ago

cats-mtl will provide documentation about monad transformers in general, yes.

Edit: Because it will not provide the transformers themselves, and not the type classes, it may be a bit unusual to document them in cats-mtl. What do others think?

kailuowang commented 7 years ago

related https://github.com/typelevel/cats/pull/1714 TLDR, we may need a reformulation of StateT.