servant icon indicating copy to clipboard operation
servant copied to clipboard

Cookbook for NamedRoutes #1388

Open akhesaCaro opened this issue 4 years ago • 5 comments

Add cookbook for #1388

akhesaCaro avatar Nov 18 '21 12:11 akhesaCaro

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).

teto avatar Feb 02 '22 09:02 teto

NamedRoutes should also be part of this cookbook

tchoutri avatar Feb 03 '22 11:02 tchoutri

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.

akhesaCaro avatar Feb 03 '22 13:02 akhesaCaro

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 :)

akhesaCaro avatar Feb 04 '22 10:02 akhesaCaro

This is good: https://github.com/tweag/servant-template/blob/78c67df9f2b7030566c8e49fd5fc272f31079d8b/src/API/Application.hs#L12

domenkozar avatar Dec 31 '23 12:12 domenkozar