sj      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  Trustworthy Type alias for Creates a 200 (OK) / with the given content-type and resposne body6Helper to make responses with content-type "text/html"Creates a 200 (OK) ; with content-type "text/html" and the given resposne body Creates a 200 (OK) B with content-type "application/json" and the given resposne body Creates a 200 (OK) A with content-type "application/xml" and the given resposne body .Given a URL returns a 301 (Moved Permanently)  redirecting to that URL. &Given a URL returns a 303 (See Other)  redirecting to that URL. Returns a 400 (Bad Request) .'Returns a 401 (Authorization Required) 4 requiring basic authentication in the given realm.Returns a 403 (Forbidden) .Returns a 404 (Not Found) .Returns a 500 (Server Error) .         Trustworthy +246=KLike  , but with m as the underlying monadLike  , but with m as the underlying monad?The class of types into which query parameters may be convertedUThe ControllerT Monad is both a State-like monad which, when run, computes either a h or a result. Within the ControllerT Monad, the remainder of the computation can be short-circuited by " ing with a .Extract the request,Modify the request for the given computation&Extract the application-specific state!Convert the controller into an "Provide a response respond r >>= f === respond r##Lift an application to a controller$!Matches on the hostname from the ,. The route only succeeds on exact matches.%Matches if the path is empty.!Note that this route checks that ] is empty, so it works as expected in nested contexts that have popped components from the  list.&)Matches on the HTTP request method (e.g. , , )'FMatches if the request's Content-Type exactly matches the given string(lRoutes the given URL pattern. Patterns can include directories as well as variable patterns (prefixed with :) to be added to  (see *) /posts/:id/posts/:id/new/:date/posts/:category/new)=Matches if the first directory in the path matches the given  ByteString*5Always matches if there is at least one directory in  but and adds a parameter to ] where the key is the first parameter and the value is the directory consumed from the path.+KLooks up the parameter name in the request's query string and returns the  Parseable value or .AFor example, for a request with query string: "?foo=bar&baz=7", queryParam "foo" would return  Just "bar", but queryParam "zap" would return Nothing.,Like +:, but throws an exception if the parameter is not present.-0Selects all values with the given parameter name.Like +1, but further processes the parameter value with read4. If that conversion fails, an exception is thrown./Like .:, but throws an exception if the parameter is not present.0Like -2, but further processes the parameter values with read8. If any read-conversion fails, an exception is thrown.21Returns the value of the given request header or + if it is not present in the HTTP request.3\Redirect back to the referer. If the referer header is not present redirect to root (i.e., /).4ZRedirect back to the referer. If the referer header is not present fallback on the given .8 !"#$%&'()*+Parameter name,-.Parameter name/Parameter name0Parameter name1234Fallback response56789:;<=>?@ABCDEFGHI' !"#$%&'()*+,-./0123456788IHGFEDCBA@?> !"#$%&'()*+,-=<;./01234567:982 !"#$%&'()*+,-./0123456789:;<=?>@ABCDEFGHI Trustworthy24JTThe Controller Monad is both a State-like monad which, when run, computes either a g or a result. Within the Controller Monad, the remainder of the computation can be short-circuited by Q ing with a .LExtract the requestM,Modify the request for the given computationN&Extract the application-specific statePConvert the controller into an QProvide a response respond r >>= f === respond rR!Matches on the hostname from the ,. The route only succeeds on exact matches.SMatches if the path is empty.!Note that this route checks that ] is empty, so it works as expected in nested contexts that have popped components from the  list.T)Matches on the HTTP request method (e.g. , , )UFMatches if the request's Content-Type exactly matches the given stringVlRoutes the given URL pattern. Patterns can include directories as well as variable patterns (prefixed with :) to be added to  (see X) /posts/:id/posts/:id/new/:date/posts/:category/newW=Matches if the first directory in the path matches the given  ByteStringX5Always matches if there is at least one directory in  but and adds a parameter to ] where the key is the first parameter and the value is the directory consumed from the path.YKLooks up the parameter name in the request's query string and returns the  Parseable value or .AFor example, for a request with query string: "?foo=bar&baz=7", queryParam "foo" would return  Just "bar", but queryParam "zap" would return Nothing.ZLike Y:, but throws an exception if the parameter is not present.[0Selects all values with the given parameter name\Like Y1, but further processes the parameter value with read4. If that conversion fails, an exception is thrown.]Like \:, but throws an exception if the parameter is not present.^Like [2, but further processes the parameter values with read8. If any read-conversion fails, an exception is thrown._?Parses a HTML form from the request body. It returns a list of s as well as a list of )s, which are pairs mapping the name of a file form field to a ? pointing to a temporary file with the contents of the upload. 2 myControllerT = do (prms, files) <- parseForm let mPicFile = lookup "profile_pic" files case mPicFile of Just (picFile) -> do sourceFile (fileContent picFile) $$ sinkFile ("images/" ++ (fileName picFile)) respond $ redirectTo "/" Nothing -> redirectBack `/Reads and returns the body of the HTTP request.a1Returns the value of the given request header or + if it is not present in the HTTP request.b\Redirect back to the referer. If the referer header is not present redirect to root (i.e., /).cZRedirect back to the referer. If the referer header is not present fallback on the given .JKLMNOPQRSTUVWXYParameter nameZ[\Parameter name]Parameter name^Parameter name_`abcFallback responseJKLMNOPQRSTUVWXYZ[\]^_`abcJPNOLMQaRSTUVWXYZ[\]^_bc`KJKLMNOPQRSTUVWXYZ[\]^_`abcNoneddddNoneeAn e authenticates a # and, if successful, forwards the  to the  Routeable.fAn eV that uses HTTP basic authentication to authenticate a request in a particular realm.g Wraps an eg to take a simpler authentication function (that just just takes a username and password, and returns  or +). It also adds an "X-User" header to the Y with the authenticated user's name (the first argument to the authentication function).hA Route that uses HTTP basic authentication to authenticate a request for a realm with the given username ans password. The request is rewritten with an 'X-User'O header containing the authenticated username before being passed to the next Route.efghRealmUsernamePasswordefghefhgefgh Trustworthy Helper methodi/Matches the GET method on the given URL patternj0Matches the POST method on the given URL patternk/Matches the PUT method on the given URL patternl2Matches the DELETE method on the given URL patternm3Matches the OPTIONS method on the given URL patternijklmijklmijklmijklm Trustworthy16o The layout to use by default. Layouts are just templates that embed views. They are rendered with the a global object containing the rendered view in the "yield" field, and the object the view was rendered with in the "page" field. By default, no template is used.p*The directory to look for views passed to s. This defaults to "views", so render "index.html.tmpl" ... 9will look for a view template in "views/index.html.tmpl".qHA map of pure functions that can be called from within a template. See  and  for details.r@Function to use to get a template. By default, it looks in the p for the given file name and compiles the file into a template. This can be overriden to, for example, cache compiled templates in memory.siRenders a view template with the default layout and a global used to evaluate variables in the template.tSame as s but without a template.u;Render a view using the layout named by the first argument.vSame as u% but uses an already compiled layout.nopqrstuvwxynopqrstuvwxynopqrstuvwxynopqrstuvwxy Trustworthy24 5Monad used to encode a REST controller incrementally.{&Type used to encode a REST controller.Default state, returns 404 for all verbs.GET /POST / GET /:id/editGET /newGET /:idPUT /:id DELETE /:idz{|}~z{|}~{|}~z z{|}~  TrustworthyR JKLMNOPQRSTUVWXYZ[\]^_`abcd      !"#$$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTU'()*+,-/0123456789:;VW=>?XYZ[\]^_`abcdefghijklmnoopqrstuvwxyz{|}~`simple-0.10.0.0Web.Simple.TemplatesWeb.Simple.ResponsesWeb.Simple.Controller.TransWeb.Simple.ControllerWeb.Simple.StaticWeb.Simple.Auth Web.FrankWeb.REST Web.Simplesimple-templates-0.8.0.0Web.Simple.Templates.TypescallFunction toFunction ToFunction FunctionMapunordered-containers-0.2.5.1Data.HashMap.StrictfromListokokHtmlokJsonokXmlmovedTo redirectTo badRequestrequireBasicAuth forbiddennotFound serverErrorControllerExceptionSimpleMiddlewareSimpleApplication Parseableparse ControllerT runControllerStCtrl hoistEitherrequest localRequestcontrollerStateputState controllerApprespondfromApp routeHostrouteTop routeMethod routeAccept routePattern routeNamerouteVar queryParam queryParam' queryParamsreadQueryParamreadQueryParam'readQueryParamsreadParamValue requestHeader redirectBackredirectBackOrguardguardMguardReqerr$fExceptionControllerException$fShowControllerException$fParseableText $fParseable[]$fParseableByteStringTFCo:R:StMControllerTa$fMonadBaseControlmControllerT$fMonadBasemControllerT$fMonadIOControllerT$fMonadReaderRequestControllerT$fMonadStatesControllerT$fMonadTransControllerT$fMonadPlusControllerT$fAlternativeControllerT$fMonadControllerT$fApplicativeControllerT$fFunctorControllerT Controller parseFormbody serveStatic AuthRouterbasicAuthRouteauthRewriteReq basicAuthgetpostputdeleteoptions HasTemplates defaultLayout viewDirectory functionMap getTemplaterender renderPlain renderLayout renderLayout'defaultGetTemplate defaultRenderdefaultFunctionMapRESTControllerREST restIndexrestShow restCreate restUpdate restDeleterestEditrestNewrest routeRESTindexcreateeditnewshowupdate ContentTypebytestring-0.10.4.0Data.ByteString.Internal ByteString wai-3.0.2Network.Wai.InternalResponsemkHtmlResponse Network.Wai ApplicationRequestpathInfohttp-types-0.8.5Network.HTTP.Types.MethodGETPOSTPUT queryStringbase Data.MaybeNothingwai-extra-3.0.2.1Network.Wai.ParseParamFileFileInfoghc-prim GHC.TypesTrueFalse frankMethod valueLength valueNullRESTControllerM defaultRESTlazyRequestBodystrictRequestBodydefaultRequestresponseToStreamresponseHeadersresponseStatus responseRawresponseStream responseLBSresponseBuilder responseFile MiddlewarerequestHeaderRangerequestHeaderHostrequestBodyLengthvault requestBody remoteHostisSecurerequestHeadersrawQueryString rawPathInfo httpVersion requestMethod StreamingBody ChunkedBody KnownLengthRequestBodyLengthfilePartFileSizefilePartByteCountfilePartOffsetFilePartResponseReceived