d$^2      !"#$%&'()*+,-./01(c) 2015 Athan Clark BSD-styleathan.clark@gmail.com experimentalGHCNone !"(IKLN #Container when defining route paths2Constrained to AttoParsec, Regex-Compat and T.TextThe Origin chunk - the equivalent to []Match against a Literal chunk-Removes file extension from the matched route Match against a Parsed chunk, with  .https://hackage.haskell.org/package/attoparsec attoparsec. Match against a Regular expression chunk, with  0https://hackage.haskell.org/package/regex-compat regex-compat. 6Match with a predicate against the url chunk directly. 7Prefix a routable path by more predicative lookup data.     (c) 2015 Athan Clark BSD-styleathan.clark@gmail.com experimentalGHCNone&-4>CL-The type of "content" builders; using the  8https://hackage.haskell.org/package/wai-middleware-verbswai-middleware-verbs and  ?https://hackage.haskell.org/package/wai-middleware-content-typewai-middleware-content-type packages.`Soundness constraint showing that a function's arity can be represented as a type-level list.{The (syntactic) monad for building a router with functions like "Web.Routes.Nested.match". it should have a shape of -RouterT (MiddlewareT m) (SecurityToken s) m a- when used with "Web.Routes.Nested.route".;The internal data structure built during route declaration.>Run the monad, only getting the built state and throwing away a.aRun the content builder into a middleware that responds when the content is satisfiable (i.e. Accept headers are O.K., etc.)2 2(c) 2015 Athan Clark BSD-styleathan.clark@gmail.com experimentalGHCNone!"&'4>FKLNiDesignate the scope of security to the set of routes - either only the adjacent routes, or the adjacent and8 the parent container node (root node if not declared). (Use a custom security token type and an  to define where and  what kind of security should take place.$The constraints necessary for ).%The constraints necessary for &.&Embed a 3V into a set of routes via a matching string. You should expect the match to create arity in your handler - the  childContent variable. The arity of  childContent may grow or shrink, depending on the heterogeneous list created from the list of parsers, regular expressions, or arbitrary predicates in the order written - so something like: 2match (p_ "double-parser" double </> o_) handler...then handler must have arity  Double ->>. If this route was at the top level, then the total arity must be Double -> MiddlewareT m.MGenerally, if the routes you are building get grouped by a predicate with )/, then we would need another level of arity before the Double.'Create a handle for the current route - an alias for h -> match o_ h.(Match against any route, as a last resort against all failing matches - use this for a catch-all at some level in their routes, something like a  not-found 404 page is useful.)Prepends a common route to an existing set of routes. You should note that doing this with a parser or regular expression will necessitate the existing arity in the handlers before the progam can compile.*eSets the security role and error handler for a set of routes, optionally including its parent route.+Use this function to run your  into a 3; making your router executable in WAI. Note that this only responds with content, and doesn't protect your routes with your calls to *.; to protect routes, postcompose this with ,: route routes . routeAuth routes,,Supply a method to decide whether or not to 4& an exception based on the current  and the layers of *: tokens passed in your router, turn your router into a  for middlewares, basically.-Extracts only the normal &, ) and ' routes..Extracts only the (4 responses; something like the greatest-lower-bound./`Find the security tokens / authorization roles affiliated with a request for a set of routes.0EExtracts only the security handling logic, and turns it into a guard.1hGiven a way to draw out a special-purpose trie from our route set, route to the responses based on a furthest-route-reached+ method, or like a greatest-lower-bound.5Removes .txt from foo.txt6MA quirky function for processing the last element of a lookup path, only on literal matches. lookupWithLPT :: ( Hashable s , Eq s ) => (s -> s) -> NonEmpty s -> PredTrie s a -> Maybe ([s], a) lookupWithLPT f (t:|ts) (PredTrie (HashMapStep ls) (PredSteps ps)) | null ts = getFirst $ First ((goLit $! f t) ls) <> foldMap (First . goPred) ps | otherwise = getFirst $ First (goLit t ls) <> foldMap (First . goPred) ps where goLit t' xs = do (HashMapChildren mx mxs) <- HM.lookup t' xs if null ts then ([t],)  $W mx else fmap ((ts',x) -> (t:ts',x)) $! lookupWithLPT f (NE.fromList ts) =<< mxsfgoPred (PredStep _ predicate mx xs) = do d <- predicate t if null ts then ([t],)  $ (mx  $~T d) else fmap ((ts',x) -> (t:ts',x d)) $! lookupWithLPT f (NE.fromList ts) xs !"#$%&!Predicative path to match againstThe response to send'The response to send(The response to send)!Predicative path to match againstChild routes to nest*Your security token+ The Router,authorization method The Router-The path to match against The Router.The path to match against The Router/The path to match against The Router0authorization method1The path to match against5678o 9:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstu !"#$%&'()*+,-./01&'()*+,-./01 !"#%$ !"#$%&'()*+,-./015678v      !"#$%&&'()*+,-./0123456789:;<=>?@ABCDBCEBCFBCFBCGBCHBCIBCJBCKBCLBCMBCNBCOPQRPQSPQSPQTPQUPQVPQVPQWPQXPQYPQZPQ[PQ\PQ]PQ^PQ_PQ`PQaPQbPQcPQdPQePQfPQgPQhPQiPjkPjlPmnPmoPpqPprPstPsuPvwPvxPyzPy{P|}P|~PPPPPPPP6Lu7UDadmvm9bQszK39914Web.Routes.Nested.MatchWeb.Routes.Nested.TypesWeb.Routes.NestedNetwork.Wai.MiddlewareRequest Control.Monadguard UrlChunksEitherUrlChunko_origin_l_literal_f_file_p_parse_r_regex_pred_ActionTExtrudeSoundlyRouterT runRouterTTries trieContent trieCatchAll trieSecuritytrieContentMutabletrieCatchAllMutabletrieSecurityMutable execRouterTaction AuthScope ProtectHereDontProtectHere SecurityToken securityToken securityScope MatchGroupMatchmatch matchHerematchAny matchGroupauthroute routeAuth extractMatchextractMatchAnyextractAuthSym extractAuthextractNearestVia $fMonoidTriesEqk6jojwUA6K4jiwBxckmvNetwork.Wai.Trans MiddlewareT5kfF6J38rko5hQMJWxoCefControl.Monad.CatchthrowM trimFileExt lookupWithLPTlookupWithLRPTtell'ATQ8Y4BezlP6iMCDI4DMpVNetwork.Wai.Middleware.VerbsVerbMaprunVerbListenerT VerbListenerTVerbputpostmapVerbs lookupVerbgetVerbgetexecVerbListenerTdeleteLByvwnZGcXEJFo8n8Rk15g(Network.Wai.Middleware.ContentType.TypesresponseFunction ResponseVia FileExtMaprunFileExtListenerTFileExtListenerTTextMarkdownJson JavaScriptHtmlCssFileExt AcceptHeadertoExtrunResponseViapossibleFileExts overFileExts mapStatus mapHeaders mapFileExtMapinvalidEncoding getFileExtexecFileExtListenerT allFileExts'Network.Wai.Middleware.ContentType.TexttextOnlytext)Network.Wai.Middleware.ContentType.Pandoc markdownOnlymarkdown)Network.Wai.Middleware.ContentType.Lucius luciusOnlylucius(Network.Wai.Middleware.ContentType.Lucid lucidOnlylucid)Network.Wai.Middleware.ContentType.Julius juliusOnlyjulius'Network.Wai.Middleware.ContentType.JsonjsonOnlyjson'Network.Wai.Middleware.ContentType.ClayclayOnlyclay*Network.Wai.Middleware.ContentType.Cassius cassiusOnlycassius-Network.Wai.Middleware.ContentType.ByteStringbytestringOnly bytestring(Network.Wai.Middleware.ContentType.Blaze blazeOnlyblaze"Network.Wai.Middleware.ContentType lookupFileExtfileExtsToMiddleware