Cookbook for NamedRoutes #1388
Add cookbook for #1388
This is the kind of example I would like to see (nested record), eventually with a custom monad https://github.com/teto/servant/blob/e1bf11fc05f1a5a7f7136ffe52a0a9d12335256f/servant-server/example/greet2.hs#L75 (btw this example doesn't compile).
NamedRoutes should also be part of this cookbook
NamedRoutes cookbook is coming soon. I have nested record among the examples.
For the custom monad, it is the second time in the week that someone is asking for that.
I think it is a good idea to add such tutorial to Servant documentation.
In the meantime @teto, I have found this in our cookbooks : https://docs.servant.dev/en/stable/cookbook/using-custom-monad/UsingCustomMonad.html.
I am freshening Servant's cookbooks up, feedback would be warmly welcomed :)
This is good: https://github.com/tweag/servant-template/blob/78c67df9f2b7030566c8e49fd5fc272f31079d8b/src/API/Application.hs#L12