Safe Haskell | None |
---|---|
Language | Haskell2010 |
- o_ :: UrlChunks ([] (Maybe *))
- origin_ :: UrlChunks `[]`
- l_ :: Text -> EitherUrlChunk (Nothing *)
- literal_ :: Text -> EitherUrlChunk Nothing
- 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)
- data EitherUrlChunk x where
- (:=) :: Text -> EitherUrlChunk Nothing
- (:~) :: (Text, Text -> Maybe r) -> EitherUrlChunk (Just r)
- data UrlChunks xs where
Path Combinators
l_ :: Text -> EitherUrlChunk (Nothing *) Source
literal_ :: Text -> EitherUrlChunk Nothing Source
Match against a Literal chunk
p_ :: (Text, Parser r) -> EitherUrlChunk (Just * r) Source
parse_ :: (Text, Parser r) -> EitherUrlChunk (Just r) Source
Match against a Parsed chunk, with attoparsec.
r_ :: (Text, Regex) -> EitherUrlChunk (Just * [String]) Source
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
data EitherUrlChunk x where Source
Constrained to AttoParsec, Regex-Compat and T.Text
(:=) :: Text -> EitherUrlChunk Nothing | |
(:~) :: (Text, Text -> Maybe r) -> EitherUrlChunk (Just r) |
(~) (Maybe *) x (Nothing *) => IsString (EitherUrlChunk x) Source | Use raw strings instead of prepending |
Extend (EitherUrlChunk (Just * r)) (RootedPredTrie Text (r -> a)) (RootedPredTrie Text a) Source | Existentially quantified case |
Extend (EitherUrlChunk (Nothing *)) (RootedPredTrie Text a) (RootedPredTrie Text a) Source | Literal case |
data UrlChunks xs where Source
Container when defining route paths
(Extrude (UrlChunks xs) trie0 trie1, Extend (EitherUrlChunk x) trie1 trie2) => Extrude (UrlChunks ((:) (Maybe *) x xs)) trie0 trie2 Source | |
(Singleton (UrlChunks xs) a trie0, Extend (EitherUrlChunk x) trie0 trie1) => Singleton (UrlChunks ((:) (Maybe *) x xs)) a trie1 Source | |
Singleton (UrlChunks ([] (Maybe *))) a (RootedPredTrie Text a) Source | |
Extrude (UrlChunks ([] (Maybe *))) (RootedPredTrie Text a) (RootedPredTrie Text a) Source |