[haskell] fix exampe code in generated README.md (#16142)

* [haskell] fix exampe code in generated README.md

Since create{{title}}Client is not a monadic action, we need to use
"let" instead of "<-".

* regenerate samples
This commit is contained in:
Masahiro Sakai 2023-07-21 19:10:11 +09:00 committed by GitHub
parent bd76c1b102
commit 76989db77a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ main = do
manager <- newManager tlsManagerSettings
-- Create the client (all endpoint functions will be available)
{{title}}Backend{..} <- API.create{{title}}Client
let {{title}}Backend{..} = API.create{{title}}Client
-- Any {{title}} API call can go here, e.g. here we call `getSomeEndpoint`
API.call{{title}} (mkClientEnv manager url) getSomeEndpoint

View File

@ -50,7 +50,7 @@ main = do
manager <- newManager tlsManagerSettings
-- Create the client (all endpoint functions will be available)
OpenAPIPetstoreBackend{..} <- API.createOpenAPIPetstoreClient
let OpenAPIPetstoreBackend{..} = API.createOpenAPIPetstoreClient
-- Any OpenAPIPetstore API call can go here, e.g. here we call `getSomeEndpoint`
API.callOpenAPIPetstore (mkClientEnv manager url) getSomeEndpoint