pred-trie-0.3.0: Predicative tries

Safe HaskellNone
LanguageHaskell2010

Data.Trie.Pred

Contents

Synopsis

Predicated Trie

data PredTrie s a Source

Constructors

PredTrie 

Fields

predLits :: MapStep PredTrie s a
 
predPreds :: PredSteps PredTrie s a
 

Instances

Ord s => Trie NonEmpty s PredTrie Source 
Functor (PredTrie s) Source 
Ord s => Monoid (PredTrie s a) Source 

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.

matchesPT :: Ord s => NonEmpty s -> PredTrie s a -> [(NonEmpty s, a, [s])] Source

Rooted Predicated Trie

data RootedPredTrie s a Source

Constructors

RootedPredTrie 

Fields

rootedBase :: Maybe a
 
rootedSub :: PredTrie s a
 

matchRPT :: Ord s => [s] -> RootedPredTrie s a -> Maybe ([s], a, [s]) Source

matchesRPT :: Ord s => [s] -> RootedPredTrie s a -> [([s], a, [s])] Source