Skip to content

Commit ce63802

Browse files
authored
Remove extra parameter from haddock section of Fragment instances (#1362)
1 parent aa4f54e commit ce63802

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

servant-client-core/src/Servant/Client/Core/HasClient.hs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -761,11 +761,10 @@ instance ( HasClient m api
761761
-- > myApi :: Proxy MyApi
762762
-- > myApi = Proxy
763763
-- >
764-
-- > getBooksBy :: Maybe Text -> ClientM [Book]
765-
-- > getBooksBy = client myApi
764+
-- > getBooks :: ClientM [Book]
765+
-- > getBooks = client myApi
766766
-- > -- then you can just use "getBooksBy" to query that endpoint.
767-
-- > -- 'getBooksBy Nothing' for all books
768-
-- > -- 'getBooksBy (Just "Isaac Asimov")' to get all books by Isaac Asimov
767+
-- > -- 'getBooks' for all books.
769768
#ifdef HAS_TYPE_ERROR
770769
instance (AtLeastOneFragment api, FragmentUnique (Fragment a :> api), HasClient m api
771770
#else

servant-server/src/Servant/Server/Internal.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -890,9 +890,9 @@ type HasServerArrowTypeError a b =
890890
-- > type MyApi = "books" :> Fragment Text :> Get '[JSON] [Book]
891891
-- >
892892
-- > server :: Server MyApi
893-
-- > server = getBooksBy
894-
-- > where getBooksBy :: Handler [Book]
895-
-- > getBooksBy = ...return all books...
893+
-- > server = getBooks
894+
-- > where getBooks :: Handler [Book]
895+
-- > getBooks = ...return all books...
896896
#ifdef HAS_TYPE_ERROR
897897
instance (AtLeastOneFragment api, FragmentUnique (Fragment a1 :> api), HasServer api context)
898898
#else

0 commit comments

Comments
 (0)