Merge pull request #1279 from theophile-fl/docs/improve-genericServerT
docs(generic): Improve the documentation for `genericServerT`
This commit is contained in:
commit
567eb733d2
1 changed files with 6 additions and 2 deletions
|
@ -31,7 +31,7 @@ instance GenericMode (AsServerT m) where
|
||||||
|
|
||||||
type AsServer = AsServerT Handler
|
type AsServer = AsServerT Handler
|
||||||
|
|
||||||
-- | Transform record of routes into a WAI 'Application'.
|
-- | Transform a record of routes into a WAI 'Application'.
|
||||||
genericServe
|
genericServe
|
||||||
:: forall routes.
|
:: forall routes.
|
||||||
( HasServer (ToServantApi routes) '[]
|
( HasServer (ToServantApi routes) '[]
|
||||||
|
@ -80,13 +80,17 @@ genericServeTWithContext f server ctx =
|
||||||
p = genericApi (Proxy :: Proxy routes)
|
p = genericApi (Proxy :: Proxy routes)
|
||||||
pctx = Proxy :: Proxy ctx
|
pctx = Proxy :: Proxy ctx
|
||||||
|
|
||||||
-- | Transform record of endpoints into a 'Server'.
|
-- | Transform a record of endpoints into a 'Server'.
|
||||||
genericServer
|
genericServer
|
||||||
:: GenericServant routes AsServer
|
:: GenericServant routes AsServer
|
||||||
=> routes AsServer
|
=> routes AsServer
|
||||||
-> ToServant routes AsServer
|
-> ToServant routes AsServer
|
||||||
genericServer = toServant
|
genericServer = toServant
|
||||||
|
|
||||||
|
-- | Transform a record of endpoints into a @'ServerT' m@.
|
||||||
|
--
|
||||||
|
-- You can see an example usage of this function
|
||||||
|
-- <https://docs.servant.dev/en/stable/cookbook/generic/Generic.html#using-generics-together-with-a-custom-monad in the Servant Cookbook>.
|
||||||
genericServerT
|
genericServerT
|
||||||
:: GenericServant routes (AsServerT m)
|
:: GenericServant routes (AsServerT m)
|
||||||
=> routes (AsServerT m)
|
=> routes (AsServerT m)
|
||||||
|
|
Loading…
Reference in a new issue