Skip to content

Commit

Permalink
Remove extra parameter from haddock section of Fragment instances (#1362
Browse files Browse the repository at this point in the history
)
  • Loading branch information
swamp-agr authored Nov 22, 2020
1 parent aa4f54e commit ce63802
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions servant-client-core/src/Servant/Client/Core/HasClient.hs
Original file line number Diff line number Diff line change
Expand Up @@ -761,11 +761,10 @@ instance ( HasClient m api
-- > myApi :: Proxy MyApi
-- > myApi = Proxy
-- >
-- > getBooksBy :: Maybe Text -> ClientM [Book]
-- > getBooksBy = client myApi
-- > getBooks :: ClientM [Book]
-- > getBooks = client myApi
-- > -- then you can just use "getBooksBy" to query that endpoint.
-- > -- 'getBooksBy Nothing' for all books
-- > -- 'getBooksBy (Just "Isaac Asimov")' to get all books by Isaac Asimov
-- > -- 'getBooks' for all books.
#ifdef HAS_TYPE_ERROR
instance (AtLeastOneFragment api, FragmentUnique (Fragment a :> api), HasClient m api
#else
Expand Down
6 changes: 3 additions & 3 deletions servant-server/src/Servant/Server/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -890,9 +890,9 @@ type HasServerArrowTypeError a b =
-- > type MyApi = "books" :> Fragment Text :> Get '[JSON] [Book]
-- >
-- > server :: Server MyApi
-- > server = getBooksBy
-- > where getBooksBy :: Handler [Book]
-- > getBooksBy = ...return all books...
-- > server = getBooks
-- > where getBooks :: Handler [Book]
-- > getBooks = ...return all books...
#ifdef HAS_TYPE_ERROR
instance (AtLeastOneFragment api, FragmentUnique (Fragment a1 :> api), HasServer api context)
#else
Expand Down

0 comments on commit ce63802

Please sign in to comment.