!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ NoneOptional whitespace parser  None24   None2468BT5 A wrapper for the ? and  4 that should be used to process requests to a path. A Resource{ is a dictionary of functions which are used in the Webcrank decision process to determine how requests should be handled.#Each function has a type of either m a or 1 m a&. A resource function which yields a  HaltT m aL value allows the function to terminate the request processing early using halt or werror.(The defaults documented are used by the resource1 smart constructor. A resource that responds to GET4 requests with an HTML response would be written as amyResource = resource { contentTypesProvided = return $ [("text/html", return "Hello world!")] } responseWithBody and responseWithHtml> are additional smart constructors useful creating resources.False will result in 503 Service Unavailable. Defaults to True.True will result in 414 Request Too Long. Defaults to False.If a Method' not in this list is requested, then a 405 Method Not Allowed will be sent. Defaults to [GET, HEAD].True will result in 400 Bad Request. Defaults to False.If  Authorized, the response will be 401 Unauthorized.  Unauthorized& will be used as the challenge in the WWW-Authenticate header, e.g.  Basic realm=Webcrank. Defaults to  Authorized.True will result in  403 Forbidden. Defaults to False.False will result in 501 Not Implemented. Defaults to True.False will result in 415 Unsupported Media Type. Defaults to True.False will result in 413 Request Entity Too Large. Defaults to True.mIf the OPTIONS method is supported and is used, the headers that should appear in the response. Defaults to [].^Content negotiation is driven by this function. For example, if a client request includes an Accept0 header with a value that does not appear as a  MediaType in any of the tuples, then a 406 Not Acceptable& will be sent. If there is a matching  MediaType_, that function is used to create the entity when a response should include one. Defaults to [].5Used on GET requests to ensure that the entity is in Charset. Defaults to  NoCharset.Used on GET requests to ensure that the body is encoded. One useful setting is to have the function check on method, and on GET requests return &[("identity", id), ("gzip", compress)]O as this is all that is needed to support gzip content encoding. Defaults to [].False will result in  404 Not Found. Defaults to True.If this returns an ETag_, it will be used for the ETag header and for comparison in conditional requests. Defaults to mzero.If this returns a HTTPDateh, it will be used for the Last-Modified header and for comparison in conditional requests. Defaults to mzero.If this returns a HTTPDate7, it will be used for the Expires header. Defaults to mzero.yIf this returns a URI, the client will receive a 301 Moved Permanently with the URI in the Location header. Defaults to mzero. vIf this returns a URI, the client will receive a 307 Temporary Redirect with URI in the Location header. Defaults to mzero.!If this returns True, the movedPermanently and movedTemporarily callbacks will be invoked to determine whether the response should be 301 Moved Permanently, 307 Temporary Redirect, or 410 Gone. Defaults to False."YIf the resource accepts POST requests to nonexistent resources, then this should return True. Defaults to False.#KThis is called when a DELETE request should be enacted, and should return True> if the deletion succeeded or has been accepted. Defaults to True.$'This is only called after a successful deleteResource call, and should return FalseZ if the deletion was accepted but cannot yet be guaranteed to have finished. Defaults to True.%If POST requests should be treated as a request to put content into a (potentially new) resource as opposed to being a generic submission for processing, then this function should return PostCreate path. If it does return PostCreate pathm, then the rest of the request will be treated much like a PUT to the path entry. Otherwise, if it returns  PostProcess a, then the action a will be run. Defaults to PostProcess $ return ().&This is used similarly to contentTypesProvidedK, except that it is for incoming resource representations -- for example, PUT~ requests. Handler functions usually want to use server specific functions to access the incoming request body. Defaults to [].'eThis function should return a list of strings with header names that should be included in a given response's Vary header. The standard conneg headers (Accept, Accept-Encoding, Accept-Charset, Accept-Language) do not need to be specified here as Webcrank will add the correct elements of those automatically depending on resource behavior. Defaults to [].(If this returns True, then it is assumed that multiple representations of the response are possible and a single one cannot be automatically chosen, so a 300 Multiple Choices will be sent instead of a 200 OK. Defaults to False.)If this returns True7, the client will receive a 409 Conflict. Defaults to False.*>Called just before the final response is constructed and sent.,How POST! requests should be treated. See %.-Treat POSTOs as a process and redirect the client to a different (possibly new) resource..Treat POST2s as a process which is executed without redirect./Treat POST.s as creating new resources and respond with  301 See Other-, redirecting the client to the new resource.0Treat POST.s as creating new resources and respond with  201 Created-, with the given path in the Location header.1Monad transformer for   functions which can halt the request processing early with an error or some other response. Values are created with the smart constructors werror and halt.24Weak or strong entity tags as used in HTTP ETag and  If-*-Match headers.5NIndicates whether the resource supports multiple character sets or not. See 6`The character sets the resource supports along with functions for converting the response body.7Indicates that the resource doesn't support any additional character sets, all responses from the resource will have the same character set, regardless of what the client requests.8`Indicates whether client is authorized to perform the requested operation on the resource. See .9vTells Webcrank that the client is not authorized to perform the operation on the resource. The value is sent in the WWW-Authenticate header of the response, e.g.  Basic realm=Webcrank.:aTells Webcrank that the client is authorized to perform the requested operation on the resource.;Response body type.<$Character set type, e.g. utf-8. See .=0Content coding type, e.g. gzip, decompress. See .?IA dictionary of functions that Webcrank needs in order to make decisions.A.Get the request method of the current request.BThe full URI of the request.C.Get the request header of the current request.D&Get the time the request was received.EpContainer used to keep track of the decision state and what is known about response while processing a request.\  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIW  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHI    !"#$%&'()*+,0/.-12435768:9;<=>?@ABCDEFGHI None3J!Smart constructor for creating a ReqData value with initial values.Lookup a response header.KNReplace any existing response headers for the header name with the new value.OReplace any existing response headers for the header name with the new values.Remove the response header.Lookup the response Location header.Set the response Location header.L Use the lazy  ByteString as the response body.JKLJKLJKL None3 M M MNoneBNMonad transformer that can be used by server API providers. Provides tracking of the request state and logging of the decisions made so far. For example @type WaiCrank m a = ReaderT (Request, HTTPDate) (WebcrankT m) a NOPQRNOPQNOPRQNOPQR None Compares two ETagas for equality, only considering them equal if they are both strong and byte-for-byte identical. Compares two ETagNs for equality, considering them equal whether or not either of them is weak.None !"6EHMTNSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~NSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~NSUTVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~LSUTVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None3CImmediately end processing of the request, returning the response Status. It is the responsibility of the resource to ensure that all necessary response header and body elements have been added in order to make that response code valid.9Immediately end processing of this request, returning a 500 Internal Server Error6 response. The response body will contain the reason. NoneHMThProcess a request according to the webmachine state diagram. Intended for use by server API providers. run4 is a function which can run process to completion. . is provided as a starting point. For the type ;type WaiCrank = ReaderT (Request, HTTPDate) (WebcrankT IO) an appropriate run function would be run :: Resource WaiCrank -> Request -> HTTPDate -> WaiCrank a -> IO (a, ReqData, LogData) run resource req date wa = runReaderT (runWebcrankT wa (ResourceData api resource) newReqData) (req, date) runNone +?@ABCDEFGHIJM?@ABCDEJHI MFG+Nonew  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNone3  Builds a  Resource mX value where all the resource functions will return default values as described in the   function documentation.7Creates a resource that provides a single content type.#Creates a resource that provides a  text/html content type. Shortcut for return . CharsetsProvidedAdd a header to the response. Create a  PostAction6 which performs resource creation without redirecting. Create a  PostAction0 which performs resource creation and redirects. Create a  PostAction/ which runs some process and does not redirect. Create a  PostAction, which runs some process and does redirects.Create a response Body from strict Text.Create a response Body from lazy Text.Create a response Body from a String.Set the response body from a String ,      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*,-./0123456789:;<=>KLN  !"#$%&'()*=8:9243,0/.-1<576>K;L  !"#$%&'()*+,-./0123456789:;<=>?@ABCCDEFEGHIJKKLMNOPQRST U V W X  YZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ 9?P       !"#$%&'()*+*,*-*.*/01232456756856956:56;56<56=56>56?56@56A56B56C56D56E56F56G56H56I56J56K56L56M56N56O56P56Q56R56S56T56U56V5WX5WY5WZ5W[5W\5W]5W^5W_5W`5Wa5Wb5Wc5Wd5We5Wf5Wg5Wh5Wi5Wj5Wk5Wl5Wm5Wn5op5oq5rs5rt5ru5rv5rw5rx5ry5rz5r{5r|5r}5r~5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5r5555555555555555555555555555555 webcrank-0.1WebcrankWebcrank.ServerAPIWebcrank.ServerAPI.WebcrankTWebcrank.Internal.DecisionCoreWebcrank.Internal.HaltWebcrank.Internal.ParsersWebcrank.Internal.HeadersWebcrank.Internal.TypesWebcrank.Internal.ReqDataWebcrank.Internal.ResourceDataWebcrank.Internal.ETagWebcrank.Internal.HandleRequest WebcrankTWebcrank.InternalhAcceptCharsethAcceptEncodinghAllowhETaghExpireshIfMatch hIfNoneMatchhIfUnmodifiedSincehTransferEncodinghVaryhWWWAuthenticate ResourceDataResourceserviceAvailable uriTooLongallowedMethodsmalformedRequest isAuthorized forbiddenvalidContentHeadersknownContentTypevalidEntityLengthoptionscontentTypesProvidedcharsetsProvidedencodingsProvidedresourceExists generateETag lastModifiedexpiresmovedPermanentlymovedTemporarilypreviouslyExistedallowMissingPostdeleteResourcedeleteCompleted postActioncontentTypesAccepted variancesmultipleChoices isConflict finishRequestLogData PostActionPostProcessRedir PostProcessPostCreateRedir PostCreateHaltTETagWeakETag StrongETagCharsetsProvided NoCharset Authorized UnauthorizedBodyCharsetEncoding HeadersMap ServerAPIsrvGetRequestMethodsrvGetRequestURIsrvGetRequestHeadersrvGetRequestTimeReqDataHasResourceData resourceData HasReqDatareqData newReqDataputResponseHeaderwriteLBSnewResourceData unWebcrankT runWebcrankT$fMonadTransWebcrankT FlowChartDoneDecisiondecision decision'donedone' runFlowChartrespond errorResponseerrorResponse'b13b12b11b10b9b8b7b6b5b4b3c3c4d4d5e5e6setCharsetFromf6f7chooseEncodingg7 getVariancesg8g9g11h7h10h11h12i4movedPermanentlyOri7i12i13j18k5k7k13l5l7l13l14l15l17m5m7m16m20n5n11 appendPathsplitURIn16o14 isConflict'o16o18o20p3p11acceptbool<%%=encodeBodyIfSet encodeBody encodeBody'runHaltThaltwerror handleRequestresourceresourceWithBodyresourceWithHtmlprovideCharsetsaddResponseHeader postCreatepostCreateRedir postProcesspostProcessRedirtextBody lazyTextBodystrBodywriteStrowsPdquotehtabspvchartokenPtcharspecialcsl1 quotedStringPqdtextobsTextdquoteP quotedString$fRenderHeaderHTTPDate $fAcceptCI$fRenderHeaderCI_resourceDataServerAPI_resourceDataResourceunHaltTHaltError$fMonoidLogData$fRenderHeaderETag $fShowETag_reqDataRespMediaType_reqDataRespCharset_reqDataRespEncoding_reqDataDispPath_reqDataRespHeaders_reqDataRespBodyresourceDataResourceresourceDataServerAPI$fHasResourceDataResourceDatamreqDataDispPathreqDataRespBodyreqDataRespCharsetreqDataRespEncodingreqDataRespHeadersreqDataRespMediaType$fHasReqDataReqDatagetResponseHeaderputResponseHeadersremoveResponseHeadergetResponseLocationputResponseLocationcallrcallr'callr''callAPIcallAPI'getRequestMethodgetRequestMethod'getRequestHeadergetRequestTime getRequestURIstrongComparisonweakComparison opaqueTag parseETags prepResponse prepError handleError renderErrorrender errorBodyhttp-date-0.0.5Network.HTTP.Date.Parser parseHTTPDateNetwork.HTTP.Date.FormatterformatHTTPDateNetwork.HTTP.Date.ConverterepochTimeToHTTPDateNetwork.HTTP.Date.TypesdefaultHTTPDatehdWkdayhdSecondhdMinutehdHourhdDayhdMonthhdYearHTTPDatehttp-media-0.5.1Network.HTTP.Media mapQuality matchQuality parseQualitymapContentLanguagemapContentMedia mapContent matchContentmapAcceptBytesmapAcceptLanguagemapAcceptMedia mapAccept matchAcceptNetwork.HTTP.Media.MediaType/./?/:// parameterssubTypemainType%Network.HTTP.Media.MediaType.Internal MediaTypeNetwork.HTTP.Media.LanguagetoParts$Network.HTTP.Media.Language.InternalLanguageNetwork.HTTP.Media.AccepthasExtensionParametersmoreSpecificThanmatches parseAcceptAcceptNetwork.HTTP.Media.QualityQualityNetwork.HTTP.Media.RenderHeader renderHeader RenderHeaderhttp-types-0.8.6Network.HTTP.Types.HeaderrenderByteRangesrenderByteRangesBuilderrenderByteRangerenderByteRangeBuilder hUserAgenthServerhRefererhRange hLocation hLastModifiedhIfRangehIfModifiedSincehDatehCookie hContentType hContentMD5hContentLengthhContentEncoding hConnection hCacheControlhAuthorizationhAcceptLanguagehAcceptHeader HeaderNameRequestHeadersResponseHeaders ByteRangeFromByteRangeFromToByteRangeSuffix ByteRange ByteRangesNetwork.HTTP.Types.MethodrenderStdMethod renderMethod parseMethod methodPatch methodOptions methodConnect methodTrace methodDelete methodPut methodHead methodPost methodGetMethodGETPOSTHEADPUTDELETETRACECONNECTOPTIONSPATCH StdMethodNetwork.HTTP.Types.QueryLiketoQuery QueryLikeNetwork.HTTP.Types.StatusstatusIsServerErrorstatusIsClientErrorstatusIsRedirectionstatusIsSuccessfulstatusIsInformationalhttpVersionNotSupported505 status505gatewayTimeout504 status504serviceUnavailable503 status503 badGateway502 status502notImplemented501 status501internalServerError500 status500 imATeaPot418 status418expectationFailed417 status417requestedRangeNotSatisfiable416 status416unsupportedMediaType415 status415requestURITooLong414 status414requestEntityTooLarge413 status413preconditionFailed412 status412lengthRequired411 status411gone410 status410 conflict409 status409requestTimeout408 status408proxyAuthenticationRequired407 status407notAcceptable406 status406methodNotAllowed405 status405 notFound404 status404 forbidden403 status403paymentRequired402 status402unauthorized401 status401 badRequest400 status400temporaryRedirect307 status307 useProxy305 status305notModified304 status304 seeOther303 status303found302 status302movedPermanently301 status301multipleChoices300 status300partialContent206 status206resetContent205 status205 noContent204 status204nonAuthoritative203 status203 accepted202 status202 created201 status201ok200 status200switchingProtocols101 status101 continue100 status100mkStatus statusMessage statusCodeStatusNetwork.HTTP.Types.URI decodePath encodePath extractPathdecodePathSegmentsencodePathSegmentsRelativeencodePathSegments urlDecode urlEncodeurlEncodeBuilderparseSimpleQuery parseQueryrenderSimpleQuery renderQueryrenderQueryBuildersimpleQueryToQueryparseQueryTextqueryToQueryTextrenderQueryTextqueryTextToQuery QueryItemQuery QueryTextSimpleQueryItem SimpleQueryNetwork.HTTP.Types.Versionhttp11http10http09 httpMinor httpMajor HttpVersion