From 3cca2a61a2105f8db2ff9632f9dcdbd911b8b7ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Choutri?= Date: Thu, 7 May 2026 22:07:49 +0200 Subject: [PATCH] Replace confusing "route" record parameter in favour of "mode" --- servant/src/Servant/API/Generic.hs | 6 +++--- servant/src/Servant/Links.hs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/servant/src/Servant/API/Generic.hs b/servant/src/Servant/API/Generic.hs index cce342a74..bb75ca3db 100644 --- a/servant/src/Servant/API/Generic.hs +++ b/servant/src/Servant/API/Generic.hs @@ -10,9 +10,9 @@ -- define a record with field types prefixed by a parameter `route`: -- -- @ --- 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') -- @ diff --git a/servant/src/Servant/Links.hs b/servant/src/Servant/Links.hs index 99134ba13..6be13f88c 100644 --- a/servant/src/Servant/Links.hs +++ b/servant/src/Servant/Links.hs @@ -374,9 +374,9 @@ allLinks' toA api = toLink toA api (Link mempty mempty mempty) -- type is used. -- -- @ --- data Record route = Record --- { _get :: route :- Capture "id" Int :> Get '[JSON] String --- , _put :: route :- ReqBody '[JSON] Int :> Put '[JSON] Bool +-- data Record mode = Record +-- { _get :: mode :- Capture "id" Int :> Get '[JSON] String +-- , _put :: mode :- ReqBody '[JSON] Int :> Put '[JSON] Bool -- } -- deriving ('Generic') --