!@D*j      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                None"#-./4;=>?@AHMSUVX_k(c) Raghu Kaippully, 2020MPL-2.0rkaippully@gmail.comNone"#-./4;=>?@AHMSUVX_k webgear-serverKModifier used to indicate whether a trait is parsed strictly or leniently. webgear-serverCModifier used to indicate whether a trait is required or optional.   (c) Raghu Kaippully, 2020MPL-2.0rkaippully@gmail.comNone"#-./4;=>?@AHMSUVX_k.gwebgear-server7Constraint that proves that all the traits in the list ts are also present in the list qs.webgear-server)Type error for nicer UX of missing traitswebgear-server&Constraint that proves that the trait t# is present in the list of traits ts.webgear-server"Get the attribute associated with t from a linked valuewebgear-server0A value linked with a type-level list of traits.webgear-server%Retrive the value from a linked valuewebgear-serverThe result of > - either a successful deduction of an attribute or an error.webgear-server!A trait is an optional attribute t associated with a value a.webgear-serverBType of the associated attribute when the trait holds for a valuewebgear-serverpType that indicates that the trait does not exist for a value. This could be an error message, parse error etc.webgear-server5Attempt to deduce the trait attribute from the value a. It is possible that deducing a trait's presence can alter the value, hence this function returns a possibly updated value along with the trait attribute on success.webgear-server*Wrap a value with an empty list of traits.webgear-serverJAttempt to link an additional trait with an already linked value via the ) operation. This can fail indicating an  of the trait.webgear-server;Remove the leading trait from the type-level list of traits webgear-serverKCombination of many derivable traits all of which are present for a value.!webgear-serverpA trivial derivable trait that is always present and whose attribute does not carry any meaningful information.(c) Raghu Kaippully, 2020MPL-2.0rkaippully@gmail.comNone"#-./4;=>?@AHMSUVX_kvK%webgear-server4HTTP request routing with short circuiting behavior.&webgear-server=Mark the current route as rejected, alternatives can be tried'webgear-server7Short-circuit the current handler and return a response(webgear-serverHandle an error response)webgear-serverThe monad for routing.,webgear-server.Responses that cause routes to abort execution-webgear-server4A route did not match and the next one can be tried.webgear-server?A route matched but returned a short circuiting error response/webgear-server6The path components to be matched by routing machinery1webgear-server'A response middleware that runs on the ) monad.2webgear-serverPA middleware that manipulates only the response and passes the request through.3webgear-server&A request middleware that runs on the ) monad.4webgear-serverWA middleware that manipulates only the request traits and passes the response through.5webgear-serverA middleware that runs on the ) monad.6webgear-serveriA middleware takes a handler as input and produces another handler that usually adds some functionality.JA middleware can do a number of things with the request handling such as:6Change the request traits before invoking the handler.2Use the linked value of any of the request traits.Change the response body.7webgear-serverA handler that runs on the ) monad.8webgear-serverA handler is a function from a request to response in a monadic context. Both the request and the response can have linked traits.The type level list req@ contains all the traits expected to be present in the request.9webgear-server4An HTTP response sent from the server to the client.OThe response contains a status, optional headers and an optional body of type a.;webgear-serverResponse status code<webgear-serverResponse headers=webgear-serverOptional response body>webgear-server!Get the value of a request header?webgear-serverLooks up a response header@webgear-serverSet a response header valueAwebgear-server-Convert a WebGear response to a WAI Response.Bwebgear-server.Create a response with a given status and bodyCwebgear-serverContinue 100 responseDwebgear-server Switching Protocols 101 responseEwebgear-serverOK 200 responseFwebgear-serverCreated 201 responseGwebgear-serverAccepted 202 responseHwebgear-serverNon-Authoritative 203 responseIwebgear-serverNo Content 204 responseJwebgear-serverReset Content 205 responseKwebgear-serverPartial Content 206 responseLwebgear-serverMultiple Choices 300 responseMwebgear-serverMoved Permanently 301 responseNwebgear-serverFound 302 responseOwebgear-serverSee Other 303 responsePwebgear-serverNot Modified 304 responseQwebgear-serverTemporary Redirect 307 responseRwebgear-serverPermanent Redirect 308 responseSwebgear-serverBad Request 400 responseTwebgear-serverUnauthorized 401 responseUwebgear-serverPayment Required 402 responseVwebgear-serverForbidden 403 responseWwebgear-serverNot Found 404 responseXwebgear-serverMethod Not Allowed 405 responseYwebgear-serverNot Acceptable 406 responseZwebgear-server*Proxy Authentication Required 407 response[webgear-serverRequest Timeout 408 response\webgear-serverConflict 409 response]webgear-serverGone 410 response^webgear-serverLength Required 411 response_webgear-server Precondition Failed 412 response`webgear-server%Request Entity Too Large 413 responseawebgear-server!Request URI Too Long 414 responsebwebgear-server#Unsupported Media Type 415 responsecwebgear-server,Requested Range Not Satisfiable 416 responsedwebgear-serverExpectation Failed 417 responseewebgear-serverI'm A Teapot 418 responsefwebgear-server!Unprocessable Entity 422 responsegwebgear-server"Precondition Required 428 responsehwebgear-serverToo Many Requests 429 responseiwebgear-server,Request Header Fields Too Large 431 responsejwebgear-server"Internal Server Error 500 responsekwebgear-serverNot Implemented 501 responselwebgear-serverBad Gateway 502 responsemwebgear-server Service Unavailable 503 responsenwebgear-serverGateway Timeout 504 responseowebgear-server'HTTP Version Not Supported 505 responsepwebgear-server,Network Authentication Required 511 responseqwebgear-server+A natural transformation of handler monads.CThis is useful if you want to run a handler in a monad other than ).rwebgear-serverJConvert a routable handler into a plain function from request to response.swebgear-server1Convert a routable handler into a Wai applicationY %&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrsY >9:;<=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnop87654321)*+%&'(/0,-.qrs(c) Raghu Kaippully, 2020MPL-2.0rkaippully@gmail.comNone"#-./4;=>?@AHMSUVX_k webgear-server%Error in converting a query parameterwebgear-server#Indicates a missing query parameterwebgear-server+Capture a query parameter with a specified name$ and convert it to a value of type val via . The type parameter e[ denotes whether the query parameter is required to be present. The parse style parameter pE determines whether the conversion is applied strictly or leniently.webgear-server+Capture a query parameter with a specified name$ and convert it to a value of type val via .webgear-serverMA middleware to extract a query parameter and convert it to a value of type val using .Example usage:  queryParam @"limit" @Int handler(The associated trait attribute has type val|. This middleware will respond with a 400 Bad Request response if the query parameter is not found or could not be parsed.webgear-serverWA middleware to extract an optional query parameter and convert it to a value of type val using .Example usage: (optionalQueryParam @"limit" @Int handler(The associated trait attribute has type  Maybe val; a Nothingv value indicates a missing param. A 400 Bad Request response is returned if the query parameter could not be parsed.webgear-serverMA middleware to extract a query parameter and convert it to a value of type val using .Example usage: 'lenientQueryParam @"limit" @Int handler(The associated trait attribute has type Either Text val. A 400 Bad Request reponse is returned if the query parameter is missing. The parsing is done leniently; the trait attribute is set to  Left Text in case of parse errors or  Right val on success.webgear-serverWA middleware to extract an optional query parameter and convert it to a value of type val using .Example usage: 8optionalLenientHeader @"Content-Length" @Integer handler(The associated trait attribute has type Maybe (Either Text val). This middleware never fails. (c) Raghu Kaippully, 2020MPL-2.0rkaippully@gmail.comNone"#-./4;=>?@AHMSUVX_kwebgear-serverA typeclass to map a  from type level to term level.webgear-serverConvert t to term level.webgear-server1Failure to match method against an expected valuewebgear-serverA + for capturing the HTTP method of a requestwebgear-serverGA middleware to check whether the request has a specified HTTP method.=Typically this would be used with a type application such as: method @GET handler>It is also idiomatic to use the template haskell quasiquoter  ? in cases where both HTTP method and path needs to be matched.(c) Raghu Kaippully, 2020MPL-2.0rkaippully@gmail.comNone"#-./4;=>?@AHMSUVX_kӜwebgear-server$Failure in extracting a header valuewebgear-serverA - for ensuring that a header with a specified name has value val.webgear-serverA 1 for ensuring that an HTTP header with specified name has value val. The modifier e] determines how missing headers are handled. The header name is compared case-insensitively.webgear-serverError in converting a headerwebgear-serverIndicates a missing headerwebgear-serverA " for capturing a header with name name7 in a request or response and convert it to some type val via .webgear-serverA + for capturing an HTTP header of specified name! and converting it to some type val via . The modifiers e and po determine how missing headers and parsing errors are handled. The header name is compared case-insensitively.webgear-serverJA middleware to extract a header value and convert it to a value of type val using .Example usage: )header @"Content-Length" @Integer handler(The associated trait attribute has type val]. A 400 Bad Request response is returned if the header is not found or could not be parsed.webgear-serverJA middleware to extract a header value and convert it to a value of type val using .Example usage: 1optionalHeader @"Content-Length" @Integer handler(The associated trait attribute has type  Maybe val; a Nothing value indicates that the header is missing from the request. A 400 Bad Request response is returned if the header could not be parsed.webgear-serverJA middleware to extract a header value and convert it to a value of type val using .Example usage: 0lenientHeader @"Content-Length" @Integer handler(The associated trait attribute has type Either Text val. A 400 Bad Request reponse is returned if the header is missing. The parsing is done leniently; the trait attribute is set to  Left Text in case of parse errors or  Right val on success.webgear-serverTA middleware to extract an optional header value and convert it to a value of type val using .Example usage: 8optionalLenientHeader @"Content-Length" @Integer handler(The associated trait attribute has type Maybe (Either Text val). This middleware never fails.webgear-serverA middleware to ensure that a header in the request has a specific value. Fails the handler with a 400 Bad Request response if the header does not exist or does not match.webgear-serverA middleware to ensure that an optional header in the request has a specific value. Fails the handler with a 400 Bad Request response if the header has a different value.webgear-serverA middleware to check that the Content-Type header in the request has a specific value. It will fail the handler if the header did not match.Example usage: 4requestContentTypeHeader @"application/json" handlerwebgear-server3A middleware to create or update a response header.Example usage: ;addResponseHeader "Content-type" "application/json" handler (c) Raghu Kaippully, 2020MPL-2.0rkaippully@gmail.comNone"#-./4;=>?@AHMSUVX_k (c) Raghu Kaippully, 2020MPL-2.0rkaippully@gmail.comNone"#-./4;=>?@AHMSUVX_k webgear-serverITrait to indicate that no more path components are present in the requestwebgear-serverFailure to extract a webgear-serverDA path variable that is extracted and converted to a value of type val. The tagM is usually a type-level symbol (string) to uniquely identify this variable.webgear-serverZA path component which is literally matched against the request but discarded after that.webgear-server)A middleware that literally matches path s. The symbol s{ could contain one or more parts separated by a forward slash character. The route will be rejected if there is no match.]For example, the following code could be used to match the URL path "a/b/c" and then invoke handler: path @"a/b/c" handlerwebgear-serverIA middleware that captures a path variable from a single path component.3The value captured is converted to a value of type val via O. The route will be rejected if the value is not found or cannot be converted.KFor example, the following code could be used to read a path component as 2 tagged with the symbol "objId", and then invoke handler: pathVar @"objId" @Int handlerwebgear-server7A middleware that verifies that end of path is reached.webgear-serverRProduces middleware(s) to match an optional HTTP method and some path components.tThis middleware matches a prefix of path components, the remaining components can be matched by subsequent uses of .-This quasiquoter can be used in several ways:' QuasiQuoter W Equivalent Middleware  [match| /a/b/c |]   @"/a/b/c">  atch| /a/b/objId:Int/d |]   @"/a/b" .  @"objId" @Int .  @"d"  [match| GET /a/b/c |]   @GET .  @"/a/b/c"-  [match| GET /a/b/objId:Int/d |]   @GET .  @"/a/b" .  @"objId" @Int .  @"d" webgear-serverUProduces middleware(s) to match an optional HTTP method and the entire request path.`This middleware is intended to be used in cases where the entire path needs to be matched. Use : middleware to match only an initial portion of the path.-This quasiquoter can be used in several ways:' QuasiQuoter c Equivalent Middleware  [route| /a/b/c |]   @"/a/b/c" . >  oute| /a/b/objId:Int/d |]   @"/a/b" .  @"objId" @Int .  @"d" .   [route| GET /a/b/c |]   @GET .  @"/a/b/c" . -  [route| GET /a/b/objId:Int/d |]   @GET .  @"/a/b" .  @"objId" @Int .  @"d" .  (c) Raghu Kaippully, 2020MPL-2.0rkaippully@gmail.comNone"#-./4;=>?@AHMSUVX_k%webgear-serverA 1 for converting a JSON request body into a value.webgear-serverPA middleware to parse the request body as JSON and convert it to a value via a  instance.Usage for a type t which has a  instance: jsonRequestBody @t handler<Returns a 400 Bad Request response on failure to parse body.webgear-server3A middleware that converts the response that has a  instance to a  response.TThis will also set the "Content-Type" header of the response to "application/json".Usage for a type t which has a  instance: jsonResponseBody @t handler (c) Raghu Kaippully, 2020MPL-2.0rkaippully@gmail.comNone"#-./4;=>?@AHMSUVX_k webgear-server1Error extracting credentials from an HTTP requestwebgear-server2Authorization header is missing or badly formattedwebgear-serverAuthorization scheme is not Basicwebgear-server?Basic authentication credentials retrieved from an HTTP requestwebgear-server"Password for basic authentication.webgear-serverRUsername for basic authentication. Valid usernames cannot contain ':' characters.webgear-server-The protection space for basic authenticationwebgear-server%Trait for HTTP basic authentication: #https://tools.ietf.org/html/rfc7617webgear-server@Middleware to add basic authentication protection for a handler.Example usage: ,basicAuth "realm" isValidCredentials handlerThis middleware returns a 401 response if no credentials are found in the request. It returns a 403 response if credentials are present but isValidCredentials returns False. (c) Raghu Kaippully, 2020MPL-2.0rkaippully@gmail.comNone"#-./4;=>?@AHMSUVX_k#C(c) Raghu Kaippully, 2020MPL-2.0rkaippully@gmail.comNone"#-./4;=>?@AHMSUVX_k% !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ %&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs !"#$%&'()*+,-./0123456789::;<=>??@ABCDEFGHHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                         ! "#$%&'(&)*+,-./0./123423526726726829:29:;<=;<>;<?;<@;<ABCD.EF.EG.EH.EI.EJ.EK.EL.EM.EN.EO.EP.EQ.ER.ES.ET.EU.EV.EW.EX.EY.EZ.E[.E\.E].E!.E^.E_.E`.Ea.Eb.Ec.Ed.Ee.Ef.Eg.Eh.Ei.Ej.Ek.El.Em.En.Eo.Ep.Eq.Er.Es.Et.Eu.Ev.Ew.Ex.Ey.Ez.E{.E|.E}.E~.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E.E...+webgear-server-0.2.0-3jvQ1AxxvBmCszIxntTX6Y WebGear.TypesWebGear.Modifiers WebGear.TraitWebGear.Middlewares.ParamsWebGear.Middlewares.MethodWebGear.Middlewares.HeaderWebGear.Middlewares.PathWebGear.Middlewares.BodyWebGear.Middlewares.Auth.BasicPaths_webgear_servermatch WebGear.UtilWebGear.MiddlewaresWebGear"wai-3.2.2.1-Gv9oUu1pcIy4ibAiuocezCNetwork.Wai.InternalgetRequestBodyChunkrequestBodyLength queryStringpathInfo remoteHostisSecurerequestHeaders httpVersion requestMethodRequest ParseStyleStrictLenient ExistenceRequiredOptionalHave MissingTraitHasgetLinkedunlinkResultNotFoundFoundTrait AttributeAbsence toAttributelinkproberemove $fTrait[]:am $fTrait[][]am$fHaskt: $fHasTYPEt: $fHaskt[] MonadRouter rejectRoute errorResponsecatchErrorResponseRouterunRouter RouteError RouteMismatch ErrorResponsePathInfoResponseMiddlewareResponseMiddleware'RequestMiddlewareRequestMiddleware' Middleware Middleware'HandlerHandler'ResponseresponseStatusresponseHeaders responseBody requestHeaderresponseHeadersetResponseHeader waiResponserespond continue100switchingProtocols101ok200 created201 accepted202nonAuthoritative203 noContent204resetContent205partialContent206multipleChoices300movedPermanently301found302 seeOther303notModified304temporaryRedirect307permanentRedirect308 badRequest400unauthorized401paymentRequired402 forbidden403 notFound404methodNotAllowed405notAcceptable406proxyAuthenticationRequired407requestTimeout408 conflict409gone410lengthRequired411preconditionFailed412requestEntityTooLarge413requestURITooLong414unsupportedMediaType415requestedRangeNotSatisfiable416expectationFailed417 imATeapot418unprocessableEntity422preconditionRequired428tooManyRequests429requestHeaderFieldsTooLarge431internalServerError500notImplemented501 badGateway502serviceUnavailable503gatewayTimeout504httpVersionNotSupported505 networkAuthenticationRequired511 transformrunRoute toApplication$fMonoidRouteError$fSemigroupRouteError$fMonadRouterRouter $fEqResponse $fOrdResponse$fShowResponse$fFunctorResponse$fEqRouteError$fOrdRouteError$fShowRouteError$fFunctorRouter$fApplicativeRouter$fAlternativeRouter $fMonadRouter$fMonadPlusRouter$fMonadErrorRouter$fMonadStateRouter$fMonadIORouterParamParseError ParamNotFound QueryParam' QueryParam queryParamoptionalQueryParamlenientQueryParamoptionalLenientQueryParam$fTraitTYPEQueryParam'Requestm$fTraitTYPEQueryParam'Requestm0$fTraitTYPEQueryParam'Requestm1$fTraitTYPEQueryParam'Requestm2$fReadParamNotFound$fShowParamNotFound$fEqParamNotFound$fReadParamParseError$fShowParamParseError$fEqParamParseError IsStdMethod toStdMethodMethodMismatchexpectedMethod actualMethodMethodmethod$fIsStdMethodStdMethodPATCH$fIsStdMethodStdMethodOPTIONS$fIsStdMethodStdMethodCONNECT$fIsStdMethodStdMethodTRACE$fIsStdMethodStdMethodDELETE$fIsStdMethodStdMethodPUT$fIsStdMethodStdMethodHEAD$fIsStdMethodStdMethodPOST$fIsStdMethodStdMethodGET$fTraitTYPEMethodRequestmHeaderMismatchexpectedHeader actualHeader HeaderMatch HeaderMatch'HeaderParseErrorHeaderNotFoundHeaderHeader'headeroptionalHeader lenientHeaderoptionalLenientHeader headerMatchoptionalHeaderMatchrequestContentTypeHeaderaddResponseHeader$fTraitTYPEHeader'Responsem$fTraitTYPEHeader'Requestm$fTraitTYPEHeader'Responsem0$fTraitTYPEHeader'Requestm0$fTraitTYPEHeader'Responsem1$fTraitTYPEHeader'Responsem2$fTraitTYPEHeader'Requestm1$fTraitTYPEHeader'Requestm2$fTraitTYPEHeaderMatch'Requestm $fTraitTYPEHeaderMatch'Requestm0$fReadHeaderNotFound$fShowHeaderNotFound$fEqHeaderNotFound$fReadHeaderParseError$fShowHeaderParseError$fEqHeaderParseError$fEqHeaderMismatch$fReadHeaderMismatch$fShowHeaderMismatchPathEnd PathVarErrorPathVarNotFoundPathVarParseErrorPathVarPathpathpathVarpathEndroute$fTraitTYPEPathRequestm$fTraitTYPEPathVarRequestm$fTraitTYPEPathEndRequestm$fEqPathVarError$fShowPathVarError$fReadPathVarErrorJSONRequestBodyjsonRequestBodyjsonResponseBody"$fTraitTYPEJSONRequestBodyRequestmBasicAuthErrorAuthHeaderErrorAuthSchemeMismatch CredentialscredentialsUsernamecredentialsPasswordPasswordUsernameRealm BasicAuth basicAuth$fTraitTYPEBasicAuthRequestm $fEqRealm $fOrdRealm $fShowRealm $fReadRealm$fIsStringRealm $fEqUsername $fOrdUsername$fShowUsername$fReadUsername$fIsStringUsername $fEqPassword $fOrdPassword$fShowPassword$fReadPassword$fIsStringPassword$fEqCredentials$fOrdCredentials$fShowCredentials$fReadCredentials$fEqBasicAuthError$fOrdBasicAuthError$fShowBasicAuthError$fReadBasicAuthErrorversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName*http-api-data-0.4.2-BAKWFcvzGpSJPdTdysr6G0Web.Internal.HttpApiDataFromHttpApiData(http-types-0.12.3-A2cx1Lg5j0cKG76Sfj8L06Network.HTTP.Types.Method StdMethod takeWhileMsplitOn maybeToRightghc-prim GHC.TypesInt$aeson-1.5.4.0-G0TmHbZVsdpCqiHJx3XHHoData.Aeson.Types.FromJSONFromJSONData.Aeson.Types.ToJSONToJSONbytestring-0.10.8.2Data.ByteString.Lazy.Internal ByteString text-1.2.3.1Data.Text.InternalTextemptybaseGHC.Base Alternative<|> Control.ArrowKleisli runKleisli Data.ProxyProxy1bytestring-conversion-0.3.1-9V7IehelQT1chCW2b0VqiData.ByteString.Conversion.To runBuilder toByteString' toByteString ToByteStringbuilder parseUrlPiece parseHeaderparseQueryParam Data.Textcopy stripSuffixcommonPrefixes stripPrefix isInfixOf isSuffixOf isPrefixOfunwordsunlineslineswordszipWithzipcount findIndexindex breakOnAll breakOnEndbreakOnfilter partitionfindchunksOfsplittailsinitsgroupgroupBybreakspansplitAtstripstripEnd stripStart dropAround dropWhileEnd dropWhile takeWhileEnd takeWhiledropEnddroptakeEndtakeunfoldrNunfoldr replicate mapAccumR mapAccumLscanr1scanrscanl1scanlminimummaximumallany concatMapconcatfoldr1foldrfoldl1'foldl1foldl'foldl transposecenter justifyRight justifyLefttoTitletoUppertoLower toCaseFoldreplacereverse intersperse intercalatemap compareLengthlengthnullunsnocinittaillastunconsheadappendsnocconspackData.Text.Show singletonunpackCString#unpack