Skip to content

Commit 567eb73

Browse files
authored
Merge pull request #1279 from theophile-fl/docs/improve-genericServerT
docs(generic): Improve the documentation for `genericServerT`
2 parents 5998429 + b3b3dc9 commit 567eb73

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ instance GenericMode (AsServerT m) where
3131

3232
type AsServer = AsServerT Handler
3333

34-
-- | Transform record of routes into a WAI 'Application'.
34+
-- | Transform a record of routes into a WAI 'Application'.
3535
genericServe
3636
:: forall routes.
3737
( HasServer (ToServantApi routes) '[]
@@ -80,13 +80,17 @@ genericServeTWithContext f server ctx =
8080
p = genericApi (Proxy :: Proxy routes)
8181
pctx = Proxy :: Proxy ctx
8282

83-
-- | Transform record of endpoints into a 'Server'.
83+
-- | Transform a record of endpoints into a 'Server'.
8484
genericServer
8585
:: GenericServant routes AsServer
8686
=> routes AsServer
8787
-> ToServant routes AsServer
8888
genericServer = toServant
8989

90+
-- | Transform a record of endpoints into a @'ServerT' m@.
91+
--
92+
-- You can see an example usage of this function
93+
-- <https://docs.servant.dev/en/stable/cookbook/generic/Generic.html#using-generics-together-with-a-custom-monad in the Servant Cookbook>.
9094
genericServerT
9195
:: GenericServant routes (AsServerT m)
9296
=> routes (AsServerT m)

0 commit comments

Comments
 (0)