úÎP‚LC*      !"#$%&'()portable experimentalpartners@seereason.comNone&monad transformer for generating URLs  convert a < based route handler to a handler that can be used with the Site type +NOTE: this function used to be the same as *. If you want the old behavior, just call . #Transform the computation inside a RouteT. 0Execute a computation in a modified environment  *+,-./012345678   *+,-./012345678portable experimentalpartners@seereason.comNone;Encodes a list of path segments into a valid URL fragment. /This function takes the following three steps:  UTF-8 encodes the characters. D Performs percent encoding on all unreserved characters, as well as :@=+$,  Intercalates with a slash.  For example:  , encodePathInfo [\"foo\", \"bar\", \"baz\"] "foo/bar/baz"  , encodePathInfo [\"foo bar\", \"baz\/bin\"] "foo%20bar/baz%2Fbin"   encodePathInfo [\"éÜÕÝ\"] "%D7%A9%D7%9C%D7%95%D7%9D" "Performs the inverse operation of . In particular, this function: 7 Splits a string at each occurence of a forward slash. ( Percent-decodes the individual pieces. # UTF-8 decodes the resulting data. This utilizes 92 from the utf8-string library, and thus all UTF-8 1decoding errors are handled as per that library. LIn general, you will want to strip the leading slash from a pathinfo before *passing it to this function. For example:   decodePathInfo \"\" []   decodePathInfo \"\/\"  "" #Note that while function accepts a : value, it is expected that :R will only contain the subset of characters which are allowed to appear in a URL. ;;NoneLA site groups together the three functions necesary to make an application: ; A function to convert from the URL type to path segments. C A function to convert from path segments to the URL, if possible. 7 A function to return the application for a given URL. KThere are two type parameters for Site: the first is the URL datatype, the Nsecond is the application datatype. The application datatype will depend upon your server backend. 4Return the appropriate application for a given URL. @The first argument is a function which will give an appropriate E URL (as a String) for a URL datatype. This is usually / constructed by a combination of  and the ; prepending of an absolute application root. 7Well behaving applications should use this function to - generating all internal URLs. %This function must be the inverse of . %This function must be the inverse of .  Override the "default" URL, ie the result of  []. 4Retrieve the application to handle a given request.  NOTE: use  to convert a <1 url to a properly decoded list of path segments &application root, with trailing slash path info, (call & on path with leading slash stripped) ==None GSimple parsing and rendering for a type to and from URL path segments. If you''re using GHC 7.2 or later, you can use  DeriveGeneric to derive  instances of this class:   {-# LANGUAGE DeriveGeneric #-} 5 data Sitemap = Home | BlogPost Int deriving Generic  instance PathInfo Sitemap (This results in the following instance:  ! instance PathInfo Sitemap where $ toPathSegments Home = ["home"] B toPathSegments (BlogPost x) = "blog-post" : toPathSegments x / fromPathSegments = Home <$ segment "home" M <|> BlogPost <$ segment "blog-post" <*> fromPathSegments And here it is in action: toPathInfo (BlogPost 123)"/blog-post/123"6fromPathInfo "/blog-post/123" :: Either String SitemapRight (BlogPost 123)"To instead derive instances using TemplateHaskell, see   0http://hackage.haskell.org/package/web-routes-th web-routes-th. match on a specific string !match on any string >0Only matches if all segments have been consumed # show Parsec ?, using terms that relevant to parsing a url $run a  on a list of path segments returns Left  parse error on failure. returns Right a on success %0convert url into the path info portion of a URL @0convert url into the path info portion of a URL &Jconvert url + params into the path info portion of a URL + a query string 'parse a A into url using . returns Left  parse error on failure returns  Right url on success (turn a routing function into a  value using the  class $BCD !>"#$E%@&url query string parameter '(a routing function FGHIJKLMNOPQR !"#$%&'( !"$%&'(# BCD !>"#$E%@&'(FGHIJKLMNOPQRNone) test that a  instance is valid  Generates  Arbitrary url values and checks that:  fromPathInfo . toPathInfo == id ))))None*  !"#$%&'()S       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcweb-routes-0.27.3Web.Routes.PathInfoWeb.Routes.RouteTWeb.Routes.BaseWeb.Routes.SiteWeb.Routes.QuickCheck Web.Routesbase GHC.GenericsGeneric MonadRouteURL askRouteFnRouteTunRouteT runRouteT mapRouteT withRouteT liftRouteT askRouteTshowURL showURLParamsnestURLencodePathInfodecodePathInfoSite handleSiteformatPathSegmentsparsePathSegments setDefaultrunSitePathInfotoPathSegmentsfromPathSegments URLParser stripOverlapstripOverlapTextstripOverlapBSpTokensegment anySegment patternParseshowParseError parseSegments toPathInfotoPathInfoParams fromPathInfomkSitePIpathInfoInverse_prop$fMonadRouteRouteT$fMonadWriterwRouteT$fMonadTransRouteT$fMonadStatesRouteT$fMonadRWSrwsRouteT$fMonadReaderrRouteT$fMonadIORouteT$fMonadFixRouteT$fMonadErroreRouteT$fMonadContRouteT$fMonadPlusRouteT $fMonadRouteT$fAlternativeRouteT$fApplicativeRouteT$fFunctorRouteTutf8-string-0.3.7Codec.Binary.UTF8.String decodeString text-0.11.2.3Data.Text.InternalTextencodePathInfoUtf8bytestring-0.10.0.2Data.ByteString.Internal ByteString $fFunctorSiteeof parsec-3.1.3Text.Parsec.Error ParseErrortoPathInfoUtf8GHC.BaseString GPathInfogtoPathSegmentsgfromPathSegments hyphenate$fPathInfoInteger $fPathInfoInt $fPathInfo[] $fPathInfo[]0 $fPathInfo[]1$fPathInfoText $fGPathInfoK1$fGPathInfo:+:$fGPathInfo:*: $fGPathInfoM1$fGPathInfoM10$fGPathInfoM11 $fGPathInfoU1