Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data PredTrie s a = PredTrie {}
- emptyPT :: PredTrie s a
- matchPT :: Ord s => NonEmpty s -> PredTrie s a -> Maybe (NonEmpty s, a, [s])
- matchesPT :: Ord s => NonEmpty s -> PredTrie s a -> [(NonEmpty s, a, [s])]
- data RootedPredTrie s a = RootedPredTrie {
- rootedBase :: Maybe a
- rootedSub :: PredTrie s a
- emptyRPT :: RootedPredTrie s a
- matchRPT :: Ord s => [s] -> RootedPredTrie s a -> Maybe ([s], a, [s])
- matchesRPT :: Ord s => [s] -> RootedPredTrie s a -> [([s], a, [s])]
Predicated Trie
matchPT :: Ord s => NonEmpty s -> PredTrie s a -> Maybe (NonEmpty s, a, [s]) Source
Find the nearest parent node of the requested query, while returning the split of the string that was matched, and what wasn't.
Rooted Predicated Trie
data RootedPredTrie s a Source
RootedPredTrie | |
|
Ord s => Trie [] s RootedPredTrie Source | |
Functor (RootedPredTrie s) Source | |
Ord s => Monoid (RootedPredTrie s a) Source |
emptyRPT :: RootedPredTrie s a Source
matchRPT :: Ord s => [s] -> RootedPredTrie s a -> Maybe ([s], a, [s]) Source
matchesRPT :: Ord s => [s] -> RootedPredTrie s a -> [([s], a, [s])] Source