| Copyright | (c) 2015 Athan Clark |
|---|---|
| License | BSD-style |
| Maintainer | athan.clark@gmail.com |
| Stability | experimental |
| Portability | GHC |
| Safe Haskell | None |
| Language | Haskell2010 |
Web.Routes.Nested.Match
Contents
Description
- o_ :: UrlChunks `[]`
- origin_ :: UrlChunks `[]`
- l_ :: Text -> EitherUrlChunk Nothing
- literal_ :: Text -> EitherUrlChunk Nothing
- f_ :: Text -> EitherUrlChunk (Just Text)
- file_ :: Text -> EitherUrlChunk (Just Text)
- p_ :: Text -> Parser r -> EitherUrlChunk (Just r)
- parse_ :: Text -> Parser r -> EitherUrlChunk (Just r)
- r_ :: Text -> Regex -> EitherUrlChunk (Just [String])
- regex_ :: Text -> Regex -> EitherUrlChunk (Just [String])
- pred_ :: Text -> (Text -> Maybe r) -> EitherUrlChunk (Just r)
- (</>) :: EitherUrlChunk mx -> UrlChunks xs -> UrlChunks (mx : xs)
- type EitherUrlChunk = PathChunk Text
- type UrlChunks = PathChunks Text
Path Combinators
l_ :: Text -> EitherUrlChunk Nothing Source
literal_ :: Text -> EitherUrlChunk Nothing Source
Match against a Literal chunk
parse_ :: Text -> Parser r -> EitherUrlChunk (Just r) Source
Match against a Parsed chunk, with attoparsec.
regex_ :: Text -> Regex -> EitherUrlChunk (Just [String]) Source
Match against a Regular expression chunk, with regex-compat.
pred_ :: Text -> (Text -> Maybe r) -> EitherUrlChunk (Just r) Source
Match with a predicate against the url chunk directly.
(</>) :: EitherUrlChunk mx -> UrlChunks xs -> UrlChunks (mx : xs) infixr 9 Source
Prefix a routable path by more predicative lookup data.
Path Types
type EitherUrlChunk = PathChunk Text Source
Constrained to AttoParsec, Regex-Compat and T.Text
type UrlChunks = PathChunks Text Source
Container when defining route paths