diff --git a/servant-server/src/Servant/Server/Internal/RoutingApplication.hs b/servant-server/src/Servant/Server/Internal/RoutingApplication.hs index 8a01894d..f0ff4a04 100644 --- a/servant-server/src/Servant/Server/Internal/RoutingApplication.hs +++ b/servant-server/src/Servant/Server/Internal/RoutingApplication.hs @@ -28,7 +28,7 @@ type RoutingApplication = Request -- ^ the request, the field 'pathInfo' may be modified by url routing -> (RouteResult Response -> IO ResponseReceived) -> IO ResponseReceived --- | The result of matching against a path in the route tree. +-- | The result of running an endpoint handler. On success this will contains an @a@. data RouteResult a = Fail ServantErr -- ^ Keep trying other paths. The @ServantErr@ -- should only be 404, 405 or 406. diff --git a/servant-server/src/Servant/Server/Utils/CustomCombinators.hs b/servant-server/src/Servant/Server/Utils/CustomCombinators.hs index 24180e42..62a0e66c 100644 --- a/servant-server/src/Servant/Server/Utils/CustomCombinators.hs +++ b/servant-server/src/Servant/Server/Utils/CustomCombinators.hs @@ -89,8 +89,13 @@ runServerCombinator (CI i) = i -- the endpoint handler will not be called. -- -- >>> :set -XTypeFamilies +-- >>> :set -XTypeOperators +-- >>> :set -XFlexibleInstances +-- >>> :set -XMultiParamTypeClasses +-- >>> :set -Wno-missing-methods +-- >>> import Text.Read +-- >>> import Data.String.Conversions -- >>> :{ --- import Text.Read -- data MyCaptureCombinator -- instance HasServer api context => HasServer (MyCaptureCombinator :> api) context where -- type ServerT (MyCaptureCombinator :> api) m = Int -> ServerT api m @@ -175,7 +180,7 @@ makeAuthCombinator = inner -- | 'makeCombinator' allows you to write combinators that have access to the whole request -- (including the request body) while providing an additional argument to the endpoint handler. -- This includes writing combinators that allow you to stream the request body. Here's a simple --- example for that using a very simple stream implementation 'Source': +-- example for that using a very simple stream implementation @Source@: -- -- >>> import Data.ByteString -- >>> :{