- stripOverlap :: Eq a => [a] -> [a] -> [a]
- type URLParser a = GenParser String () a
- pToken :: tok -> (String -> Maybe a) -> URLParser a
- segment :: String -> URLParser String
- anySegment :: URLParser String
- patternParse :: ([String] -> Either String a) -> URLParser a
- parseSegments :: URLParser a -> [String] -> Either String a
- class PathInfo url where
- toPathSegments :: url -> [String]
- fromPathSegments :: URLParser url
- toPathInfo :: PathInfo url => url -> String
- toPathInfoParams :: PathInfo url => url -> [(String, String)] -> String
- fromPathInfo :: PathInfo url => String -> Either String url
- mkSitePI :: PathInfo url => ((url -> [(String, String)] -> String) -> url -> a) -> Site url a
- showParseError :: ParseError -> String
Documentation
stripOverlap :: Eq a => [a] -> [a] -> [a]Source
anySegment :: URLParser StringSource
match on any string
parseSegments :: URLParser a -> [String] -> Either String aSource
run a URLParser
on a list of path segments
returns Left parse error
on failure.
returns Right a
on success
class PathInfo url whereSource
toPathSegments :: url -> [String]Source
fromPathSegments :: URLParser urlSource
toPathInfo :: PathInfo url => url -> StringSource
convert url into the path info portion of a URL
convert url + params into the path info portion of a URL + a query string
fromPathInfo :: PathInfo url => String -> Either String urlSource
parse a String
into url
using PathInfo
.
returns Left parse error
on failure
returns Right url
on success
showParseError :: ParseError -> StringSource
show Parsec ParseError
using terms that relevant to parsing a url