git.iko.soy/typeable/servant
on master help sign in
Remove extra parameter from haddock section of Fragment instances (#1362)
ce63802Andrey Prokopenko
servant-client-core/src/Servant/Client/Core/HasClient.hs+3−4
@@ -761,11 +761,10 @@ instance ( HasClient m api
761-- > myApi :: Proxy MyApi
761-- > myApi :: Proxy MyApi
762-- > myApi = Proxy
762-- > myApi = Proxy
763-- >
763-- >
764−-- > getBooksBy :: Maybe Text -> ClientM [Book]
764+-- > getBooks :: ClientM [Book]
765−-- > getBooksBy = client myApi
765+-- > getBooks = client myApi
766-- > -- then you can just use "getBooksBy" to query that endpoint.
766-- > -- then you can just use "getBooksBy" to query that endpoint.
767−-- > -- 'getBooksBy Nothing' for all books
767+-- > -- 'getBooks' for all books.
768−-- > -- 'getBooksBy (Just "Isaac Asimov")' to get all books by Isaac Asimov
769#ifdef HAS_TYPE_ERROR
768#ifdef HAS_TYPE_ERROR
770instance (AtLeastOneFragment api, FragmentUnique (Fragment a :> api), HasClient m api
769instance (AtLeastOneFragment api, FragmentUnique (Fragment a :> api), HasClient m api
771#else
770#else
servant-server/src/Servant/Server/Internal.hs+3−3
@@ -890,9 +890,9 @@ type HasServerArrowTypeError a b =
890-- > type MyApi = "books" :> Fragment Text :> Get '[JSON] [Book]
890-- > type MyApi = "books" :> Fragment Text :> Get '[JSON] [Book]
891-- >
891-- >
892-- > server :: Server MyApi
892-- > server :: Server MyApi
893−-- > server = getBooksBy
893+-- > server = getBooks
894−-- > where getBooksBy :: Handler [Book]
894+-- > where getBooks :: Handler [Book]
895−-- > getBooksBy = ...return all books...
895+-- > getBooks = ...return all books...
896#ifdef HAS_TYPE_ERROR
896#ifdef HAS_TYPE_ERROR
897instance (AtLeastOneFragment api, FragmentUnique (Fragment a1 :> api), HasServer api context)
897instance (AtLeastOneFragment api, FragmentUnique (Fragment a1 :> api), HasServer api context)
898#else
898#else