Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data EitherUrlChunk x where
- (:=) :: Text -> EitherUrlChunk Nothing
- (:~) :: (Text, Parser r) -> EitherUrlChunk (Just r)
- (:*) :: (Text, Regex) -> EitherUrlChunk (Just [String])
- o :: UrlChunks `[]`
- l :: Text -> EitherUrlChunk Nothing
- p :: (Text, Parser r) -> EitherUrlChunk (Just r)
- r :: (Text, Regex) -> EitherUrlChunk (Just [String])
- (</>) :: EitherUrlChunk mx -> UrlChunks xs -> UrlChunks (mx : xs)
- data UrlChunks xs where
Documentation
data EitherUrlChunk x where Source
Constrained to AttoParsec, Regex-Compat and T.Text
(:=) :: Text -> EitherUrlChunk Nothing | |
(:~) :: (Text, Parser r) -> EitherUrlChunk (Just r) | |
(:*) :: (Text, Regex) -> EitherUrlChunk (Just [String]) |
(~) (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 |
l :: Text -> EitherUrlChunk Nothing Source
Match against a Literal chunk
p :: (Text, Parser r) -> EitherUrlChunk (Just r) Source
Match against a Parsed chunk
r :: (Text, Regex) -> EitherUrlChunk (Just [String]) Source
Match against a Regular expression chunk
(</>) :: EitherUrlChunk mx -> UrlChunks xs -> UrlChunks (mx : xs) infixr 9 Source
Glue two chunks together
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 |