From 1ca98aa84001781b484ab89fcf57f8affac6df5a Mon Sep 17 00:00:00 2001 From: akhesaCaro Date: Thu, 24 Feb 2022 15:10:05 +0100 Subject: [PATCH] removing mode explaination --- doc/cookbook/namedRoutes/NamedRoutes.lhs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/doc/cookbook/namedRoutes/NamedRoutes.lhs b/doc/cookbook/namedRoutes/NamedRoutes.lhs index 5c5a0875..e19c9df8 100644 --- a/doc/cookbook/namedRoutes/NamedRoutes.lhs +++ b/doc/cookbook/namedRoutes/NamedRoutes.lhs @@ -240,10 +240,6 @@ movieHandler movieId = MovieAPI ``` As you might have noticed, we build our handlers out of the same record types we used to define our API: `MoviesAPI` and `MovieAPI`. What kind of magic is this ? -Remember the `mode` type parameter we saw earlier? Since we need to transform our API type into a _server_, we need to provide a server `mode`, which is `AsServerT Handler` here. - -You can alternatively use the AsServer (= AsServerT Handler) type alias. If you need to define handlers in some specific App monad from your codebase, the mode would simply be changed to AsServerT App. - Finally, we can run the server and connect the API routes to the handlers as usual: ``` haskell @@ -268,8 +264,6 @@ movieCatalogClient :: API (AsClientT ClientM) movieCatalogClient = client api -- remember: api :: Proxy MovieCatalogAPI ``` -Have you noticed the `mode` `AsClient ClientM`? - We’ve also introduced some operators that help navigate through the nested records. `(//)` is used to jump from one record to another.