HORIZON HASKELLDocslts/ghc-9.14.x3e2d5682026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Moduleservant-server-0.20.3.0Haskell2010

Servant.Server.Generic

  • 2 types
  • 5 values
datadata AsServerT (m :: Type -> Type)
#

A type that specifies that an API record contains a server implementation.

Instances2GenericMode, :-
  • GenericMode (AsServerT m)Defined in servant-server-0.20.3.0 · Servant.Server.Internal
  • type (:-) (AsServerT m) api = ServerT api mDefined in servant-server-0.20.3.0 · Servant.Server.Internal
valuegenericServeTWithContext
  1. :: (GenericServant routes (AsServerT m), GenericServant routes AsApi, HasServer (ToServantApi routes) ctx, HasContextEntry (ctx .++ DefaultErrorFormatters) ErrorFormatters, ServerT (ToServantApi routes) m ~ ToServant routes (AsServerT m))
  2. => (forall a. m a -> Handler a)

    hoistServer argument to come back to Handler

  3. -> routes (AsServerT m)

    your record full of request handlers

  4. -> Context ctx

    the Context to serve the application with

  5. -> Application
#

Transform a record of routes with custom monad into a WAI Application, while using the given Context to serve the application (contexts are typically used by auth-related combinators in servant, e.g to hold auth checks) and the given transformation to map all the handlers back to the Handler monad.