renaming route into mode (for clarity and homogenization)

This commit is contained in:
akhesaCaro 2022-02-21 11:48:38 +01:00
parent 485b2530c1
commit ece559ee6e
1 changed files with 4 additions and 4 deletions

View File

@ -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)
```