Call for Servant cookbooks in preparation of v0.21

Hi everyone,

as a maintainer of Servant, I would like to call to its user base to share some of the techniques that you may have developed in your applications over the years. As you know, Servant is rather principled, and it’s not always easy to reflect the complexity of the outside world in this principled framework.

While we are lucky to have recently received contributions from industrial users, like MultiVerb, it remains that more documentation on the techniques that are in use is very welcome, especially to upskill new Haskellers.

Feel free to take a look at what you have done in your products and send a pull request. The cookbooks are located in the haskell-servant/servant repository, and are compiled as part of the test suite.

PS: We are still in the phase of accepting breaking changes for the 0.21 release. I would very much enjoy if we had more feedback from industrial users who have suffered from the discrepancies introduced over the lifespan of the framework. I have tagged the changes we are planning to introduce, there are not many of them so please familiarise yourself with them at Servant 0.21.0.0 · GitHub .

Have a nice week!

13 Likes

This isn’t related to the cookbooks, but the servant-client-core README still refers to ClientLike, which I believe hasn’t existed in Servant since #1130.

In fact, one useful cookbook entry would be a “how to write a Servant client backend”.

Is there a planned release date? I.e. how much time do we have to submit cookbook recipes?

Tag me in your PR for a review. :slight_smile:

Maybe try to get to it before the end of the year. :slight_smile:

1 Like

HI @tchoutri ,

A while ago I implemented some stuff in Servant, nothing super fancy but stuff I found useful, most notably:

  • A combinator to annotate API with documentation
  • Some helper to embed servant client into hspec-wai to test a client

Would that be relevant to add to the cookbook? I did not have a look in a while so it’s perfectly possible these are old news :slight_smile:

Yes go ahead, we certainly need more of those!

OK, will try to do it sooner rather than later :slight_smile:

Another thought, maybe the MultiVerb section of the cookbook could be updated to include some of the other types that can be used with MultiVerb, such as DescHeader and OptHeader? It’s not clear to me how these are supposed to be used.

1 Like

Very good, I added a ticket here and ping’d people who know more: Add sections regarding `DescHeader` `OptHeader` to the MultiVerb cookbook · Issue #1853 · haskell-servant/servant · GitHub

1 Like