From ece559ee6ed66a227c8496e26e2886722c49fa44 Mon Sep 17 00:00:00 2001 From: akhesaCaro Date: Mon, 21 Feb 2022 11:48:38 +0100 Subject: [PATCH] renaming route into mode (for clarity and homogenization) --- doc/cookbook/generic/Generic.lhs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/cookbook/generic/Generic.lhs b/doc/cookbook/generic/Generic.lhs index 45180230..e057cad6 100644 --- a/doc/cookbook/generic/Generic.lhs +++ b/doc/cookbook/generic/Generic.lhs @@ -22,12 +22,12 @@ import Servant.Server.Generic ``` The usage is simple, if you only need a collection of routes. -First you define a record with field types prefixed by a parameter `route`: +First you define a record with field types prefixed by a parameter `mode`: ```haskell -data Routes route = Routes - { _get :: route :- Capture "id" Int :> Get '[JSON] String - , _put :: route :- ReqBody '[JSON] Int :> Put '[JSON] Bool +data Routes mode = Routes + { _get :: mode :- Capture "id" Int :> Get '[JSON] String + , _put :: mode :- ReqBody '[JSON] Int :> Put '[JSON] Bool } deriving (Generic) ```