Fix haddock code examples in HasClient (#1640)

This commit is contained in:
Jan Hrcek 2023-01-28 13:02:11 +01:00 committed by GitHub
parent c382a1f34e
commit f71953e63d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View file

@ -330,7 +330,7 @@ data Customer = Customer {
``` ```
Here is the code that displays the homepage. Here is the code that displays the homepage.
It should contain a link to the the `/login` URL. It should contain a link to the `/login` URL.
When the user clicks on this link it will be redirected to Google login page When the user clicks on this link it will be redirected to Google login page
with some generated information. with some generated information.

View file

@ -199,7 +199,7 @@ parsers in the hope that the ones that should will always error out so
you can try until the right one returns a value.) you can try until the right one returns a value.)
[servant-exceptions](https://github.com/ch1bo/servant-exceptions) is [servant-exceptions](https://github.com/ch1bo/servant-exceptions) is
another shot at at the problem. It is inspired by another shot at the problem. It is inspired by
servant-checked-exceptions, so it may be worth taking a closer look. servant-checked-exceptions, so it may be worth taking a closer look.
The README claims that The README claims that
[cardano-sl](https://github.com/input-output-hk/cardano-sl) also has [cardano-sl](https://github.com/input-output-hk/cardano-sl) also has

View file

@ -27,7 +27,7 @@ instance HasLink sub => HasLink (Auth (tag :: [*]) value :> sub) where
-- ** Combinators -- ** Combinators
-- | A JSON Web Token (JWT) in the the Authorization header: -- | A JSON Web Token (JWT) in the Authorization header:
-- --
-- @Authorization: Bearer \<token\>@ -- @Authorization: Bearer \<token\>@
-- --

View file

@ -902,7 +902,7 @@ infixl 2 /:
-- rootClient = client api -- rootClient = client api
-- --
-- endpointClient :: ClientM Person -- endpointClient :: ClientM Person
-- endpointClient = client // subApi // endpoint -- endpointClient = client \/\/ subApi \/\/ endpoint
-- @ -- @
(//) :: a -> (a -> b) -> b (//) :: a -> (a -> b) -> b
x // f = f x x // f = f x
@ -935,10 +935,10 @@ x // f = f x
-- rootClient = client api -- rootClient = client api
-- --
-- hello :: String -> ClientM String -- hello :: String -> ClientM String
-- hello name = rootClient // hello /: name -- hello name = rootClient \/\/ hello \/: name
-- --
-- endpointClient :: ClientM Person -- endpointClient :: ClientM Person
-- endpointClient = client // subApi /: "foobar123" // endpoint -- endpointClient = client \/\/ subApi \/: "foobar123" \/\/ endpoint
-- @ -- @
(/:) :: (a -> b -> c) -> b -> a -> c (/:) :: (a -> b -> c) -> b -> a -> c
(/:) = flip (/:) = flip

View file

@ -447,7 +447,7 @@ docsWith opts intros (ExtraInfo endpoints) p =
& apiEndpoints %~ HM.unionWith (flip combineAction) endpoints & apiEndpoints %~ HM.unionWith (flip combineAction) endpoints
-- | Generate the docs for a given API that implements 'HasDocs' with with any -- | Generate the docs for a given API that implements 'HasDocs' with any
-- number of introduction(s) -- number of introduction(s)
docsWithIntros :: HasDocs api => [DocIntro] -> Proxy api -> API docsWithIntros :: HasDocs api => [DocIntro] -> Proxy api -> API
docsWithIntros intros = docsWith defaultDocOptions intros mempty docsWithIntros intros = docsWith defaultDocOptions intros mempty