?      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ None        None!""Terminate request handling with a  ServantErr via  finishWith' !"#$%&'()*+,-./012345' !"#$%&'()*+,-./012345' !"#$%&'()*+,-./012345" !"#$%&'()*+,-./012345None!"%&29;<=DIOQRTC8The result of matching against a path in the route tree.DKeep trying other paths. The  ServantErr! should only be 404, 405 or 406.EDon't try other paths.KA < without any stored checks.L Fail with the option to recover.M2Fail fatally, i.e., without any option to recover.N$Gain access to the incoming request.O.Add a capture to the end of the capture block.P2Add a method check to the end of the method block.Q/Add an auth check to the end of the auth block.R.Add a body check to the end of the body block.S2Add an accept header check to the beginning of the body block. There is a tradeoff here. In principle, we'd like to take a bad body (400) response take precedence over a failed accept check (406). BUT to allow streaming the body, we cannot run the body check and then still backtrack. We therefore do the accept check before the body check, when we can still backtrack. There are other solutions to this, but they'd be more complicated (such as delaying the body check further so that it can still be run in a situation where we'd otherwise report 406).TyMany combinators extract information that is passed to the handler without the possibility of failure. In such a case, T can be used.URun a delayed server. Performs all scheduled operations in order, and passes the results from the capture and body blocks on to the actual handler.wThis should only be called once per request; otherwise the guarantees about effect and HTTP error ordering break down.$9:;<=>?@ABCDEFGthe request, the field pathInfo may be modified by url routingHIJKLMNOPQRSTUVWXYZ[\9:;<=>?@ABCDFEGHIJKLMNOPQRSTU$GCDEFHIJ<=>?@AB\9:;[ZYXWVKLMNOPQRSTU9:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\NonefBLike `null . pathInfo`, but works with redundant trailing slashes.i.Returns a processed pathInfo from the request.In order to handle matrix parameters in the request correctly, the raw pathInfo needs to be processed, so routing works as intended. Therefor this function should be used to access the pathInfo for routing purposes. abcdefghi abcdefghi abcdefghi abcdefghiNone2Do$Internal representation of a router.x]Smart constructor for the choice between routers. We currently optimize the following cases:7Two static routers can be joined by joining their maps.=Two dynamic routers can be joined by joining their codomains.Two  WithRequestY routers can be joined by passing them the same request and joining their codomains.A  WithRequest router can be joined with anything else by passing the same request to both but ignoring it in the component that does not need it.z%Compare the structure of two routers.{?Provide a textual representation of the structure of a router.|,Apply a transformation to the response of a u.~%Interpret a router as an application.jklmnopqrstuvwxyz{|}~jklmnotpqrsuvwxyz{|}~uopqrstvwxjklmnyz{|}~jklmnopqrstuvwxyz{|}~None+,9:;<=DIQRT +Make sure the incoming request starts with "/path"5, strip it and pass the rest of the request path to  sublayout. If you use  in one of the endpoints for your API, this automatically requires your server-side handler to be a function that takes an argument of the type specified by . The  Content-Typep header is inspected, and the list provided is used to attempt deserialization. If the request does not have a  Content-Type header, it is treated as application/octet-streamu. This lets servant worry about extracting it from the request and turning it into a value of the type you specify.All it asks is for a FromJSON instance.Example: type MyApi = "books" :> ReqBody '[JSON] Book :> Post '[JSON] Book server :: Server MyApi server = postBook where postBook :: Book -> EitherT ServantErr IO Book postBook book = ...insert into your db...KJust pass the request to the underlying application and serve its response.Example: ^type MyApi = "images" :> Raw server :: Server MyApi server = serveDirectory "/var/www/images" If you use  "published" in one of the endpoints for your API, this automatically requires your server-side handler to be a function that takes an argument of type .Example: &type MyApi = "books" :> QueryFlag "published" :> Get '[JSON] [Book] server :: Server MyApi server = getBooks where getBooks :: Bool -> EitherT ServantErr IO [Book] getBooks onlyPublished = ...return all books, or only the ones that are already published, depending on the argument... If you use  "authors" Text in one of the endpoints for your API, this automatically requires your server-side handler to be a function that takes an argument of type [].]This lets servant worry about looking up 0 or more values in the query string associated to authors@ and turning each of them into a value of the type you specify.=You can control how the individual values are converted from 2 to your type by simply providing an instance of FromText for your type.Example: type MyApi = "books" :> QueryParams "authors" Text :> Get '[JSON] [Book] server :: Server MyApi server = getBooksBy where getBooksBy :: [Text] -> EitherT ServantErr IO [Book] getBooksBy authors = ...return all books by these authors... If you use  "author" Text in one of the endpoints for your API, this automatically requires your server-side handler to be a function that takes an argument of type  .This lets servant worry about looking it up in the query string and turning it into a value of the type you specify, enclosed in ?, because it may not be there and servant would then hand you .,You can control how it'll be converted from 2 to your type by simply providing an instance of FromText for your type.Example: 7type MyApi = "books" :> QueryParam "author" Text :> Get '[JSON] [Book] server :: Server MyApi server = getBooksBy where getBooksBy :: Maybe Text -> EitherT ServantErr IO [Book] getBooksBy Nothing = ...return all books... getBooksBy (Just author) = ...return books by the given author... If you use  in one of the endpoints for your API, this automatically requires your server-side handler to be a function that takes an argument of the type specified by u. This lets servant worry about extracting it from the request and turning it into a value of the type you specify.All it asks is for a FromText instance.Example: Vnewtype Referer = Referer Text deriving (Eq, Show, FromText, ToText) -- GET /view-my-referer type MyApi = "view-my-referer" :> Header "Referer" Referer :> Get '[JSON] Referer server :: Server MyApi server = viewReferer where viewReferer :: Referer -> EitherT ServantErr IO referer viewReferer referer = return referer If you use  in one of the endpoints for your API, this automatically requires your server-side handler to be a function that takes an argument of the type specified by the n. This lets servant worry about getting it from the URL and turning it into a value of the type you specify.,You can control how it'll be converted from 2 to your type by simply providing an instance of FromText for your type.Example: type MyApi = "books" :> Capture "isbn" Text :> Get '[JSON] Book server :: Server MyApi server = getBook where getBook :: Text -> EitherT ServantErr IO Book getBook isbn = ... A server for a  bF first tries to match the request against the route represented by a and if it fails tries b7. You must provide a request handler for each route. type MyApi = "books" :> Get '[JSON] [Book] -- GET /books :<|> "books" :> ReqBody Book :> Post '[JSON] Book -- POST /books server :: Server MyApi server = listAllBooks :<|> postBook where listAllBooks = ... postBook book = ...q !"#$%&'()*+,-./0123459:;<=>?@ABCDFEGHIJKLMNOPQRSTUabcdefghijklmnotpqrsuvwxyz{|}~None :DORTserve2 allows you to implement an API and produce a wai .Example: type MyApi = "books" :> Get '[JSON] [Book] -- GET /books :<|> "books" :> ReqBody Book :> Post '[JSON] Book -- POST /books server :: Server MyApi server = listAllBooks :<|> postBook where listAllBooks = ... postBook book = ... myApi :: Proxy MyApi myApi = Proxy app :: Application app = serve myApi server main :: IO () main = Network.Wai.Handler.Warp.run 8080 app* !"#$%&'()*+,-./012345* !"#$%&'()*+,-./012345 None2Serve anything under the specified directory as a  endpoint. Xtype MyApi = "static" :> Raw server :: Server MyApi server = serveDirectory "/var/www" would capture any request to /static/<something> and look for  <something> under /var/www.kIt will do its best to guess the MIME type for that file, based on the extension, and send an appropriate  Content-Type header if possible.If your goal is to serve HTML, CSS and Javascript files that use the rest of the API as a webapp backend, you will most likely not want the static files to be hidden behind a /static/+ prefix. In that case, remember to put the ( handler in the last position, because servant* will try to match the handlers in order.None      !"#$%&'()*+,-./0123456 !"#$%&'()*+,-./0123457     !"#$%&'()*+,-./0123456789:;<=>?@ABCCDEEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                       !""#$%&'()*+,-./0/1/2345678797:7;7<7=7>7?7@7A7B7C7D7E7F7G7H7I7J7K7L7M7N7O7P7Q7RSTUVWX)servant-snap-0.7.3-3EWbzelgcIcGyZZh40x5IMServant!Servant.Server.Internal.SnapShims"Servant.Server.Internal.ServantErr*Servant.Server.Internal.RoutingApplication Servant.Server.Internal.PathInfoServant.Server.Internal.RouterServant.Server.InternalServant.ServerServant.Utils.StaticFilesbase Data.ProxyProxy ApplicationsnapToApplicationsnapToApplication'applicationToSnap unSnapMethodok200 noContent204 created201 badRequest400 notFound404methodNotAllowed405unsupportedMediaType415 initThunk ServantErr errHTTPCodeerrReasonPhraseerrBody errHeaders setHeadersresponseServantErr throwErrorerr300err301err302err303err304err305err307err400err401err402err403err404err405err406err407err409err410err411err412err413err414err415err416err417err500err501err502err503err504err505$fShowServantErr$fEqServantErr$fReadServantErrDelayedM runDelayedMDelayed capturesDmethodDauthDbodyDserverD RouteResultFail FailFatalRouteRoutingApplication toApplication responseLBS runAction emptyDelayed delayedFaildelayedFailFatal withRequest addCaptureaddMethodCheck addAuthCheck addBodyCheckaddAcceptCheck passToServer runDelayed$fMonadTransDelayedM$fAlternativeDelayedM$fMonadIODelayedM$fMonadDelayedM$fApplicativeDelayedM$fFunctorDelayedM$fFunctorDelayed$fEqRouteResult$fShowRouteResult$fReadRouteResult$fFunctorRouteResultrqPathpathInfo pathSafeTail reqSafeTail reqNoPath pathIsEmptysplitMatrixParameters parsePathInfoprocessedPathInfoRouterStructureStaticRouterStructureCaptureRouterStructureRawRouterStructureChoiceStructureRouter' StaticRouter CaptureRouterCaptureAllRouter RawRouterChoiceRouter pathRouter leafRouterchoicerouterStructure sameStructure routerLayout tweakResponse runRouter runRouterEnv runChoice worseHTTPCode$fFunctorRouter'$fEqRouterStructure$fShowRouterStructureServer HasServerServerTroutecapturedallowedMethodHead allowedMethodprocessMethodRouter methodCheck acceptCheck methodRoutermethodRouterHeaders ct_wildcard$fHasServerTYPE:>$fHasServerTYPE:>0$fHasServerTYPE:>1$fHasServerTYPE:>2$fHasServerTYPE:>3$fHasServerTYPERaw$fHasServerTYPE:>4$fHasServerTYPE:>5$fHasServerTYPE:>6$fHasServerTYPE:>7$fHasServerTYPEVerb$fHasServerTYPEVerb0$fHasServerTYPE:>8$fHasServerTYPE:>9$fHasServerTYPE:<|> serveSnapserveDirectory#servant-0.11-KtgwLyJkSYWB1JEvHyMq8dServant.API.ReqBodyReqBodyServant.API.QueryParam QueryFlagghc-prim GHC.TypesBool QueryParams#text-1.2.2.2-KC7dWoG09dA1F6jKj5GSqhData.Text.InternalText QueryParamGHC.BaseMaybeNothingServant.API.HeaderHeaderServant.API.CaptureCaptureServant.API.Alternative:<|>serveApplicationServant.API.RawRaw,http-api-data-0.3.7.1-ICryB0Wm29E9THfMGqWic1Web.Internal.HttpApiData ToHttpApiData toUrlPiecetoEncodedUrlPiecetoHeader toQueryParamFromHttpApiData parseUrlPiece parseHeaderparseQueryParam'http-types-0.9.1-6OwUZikWDkJ7nkdlDPEiifNetwork.HTTP.Types.Method StdMethodGETPOSTHEADPUTDELETETRACECONNECTOPTIONSPATCHNetwork.HTTP.Types.Version HttpVersion httpMajor httpMinor*network-uri-2.6.1.0-Hz1OR91jXzHIcSp1mipvg3 Network.URIURI uriScheme uriAuthorityuriPathuriQuery uriFragmentServant.Utils.LinkssafeLinklinkURI'linkURIlinkQueryParams linkSegmentsLinkParam SingleParamArrayElemParam FlagParamLinkArrayElementStyleLinkArrayElementBracketLinkArrayElementPlainHasLinkMkLinktoLinkServant.API.TypeLevel EndpointsIsElem'IsElemIsSubAPI AllIsElemIsInIsStrictSubAPIAllIsInMapSub AppendList IsSubListElemElemGoOrAndServant.API.BasicAuth BasicAuth BasicAuthDatabasicAuthUsernamebasicAuthPassword CaptureAllServant.API.ContentTypesJSON PlainTextFormUrlEncoded OctetStreamAccept contentType contentTypes MimeRender mimeRender MimeUnrender mimeUnrendermimeUnrenderWithType NoContentServant.API.EmptyEmptyAPIServant.API.Experimental.Auth AuthProtectServant.API.ResponseHeadersnoHeader addHeaderHeaders getResponsegetHeadersHListHListHNilHConsBuildHeadersTobuildHeadersTo GetHeaders getHeaders AddHeader MissingHeaderUndecodableHeaderServant.API.IsSecureIsSecureSecure NotSecureServant.API.RemoteHost RemoteHostServant.API.Sub:>Servant.API.VerbsVerbGetPostPutDeletePatch PostCreated GetAccepted PostAcceptedDeleteAccepted PatchAccepted PutAcceptedGetNonAuthoritativePostNonAuthoritativeDeleteNonAuthoritativePatchNonAuthoritativePutNonAuthoritative GetNoContent PostNoContentDeleteNoContentPatchNoContent PutNoContentGetResetContentPostResetContentGetPartialContent ReflectMethod reflectMethodServant.API.WithNamedContextWithNamedContext$vault-0.3.0.7-81Q0onPmc53IpkIBa9iodIData.Vault.LazyVault