pred-trie-0.0.2: Predicative tries

Safe HaskellSafe
LanguageHaskell2010

Data.Trie.Pred.Unified.Fast

Synopsis

Documentation

data FUPTrie t x where Source

A fast, unified, predicative trie. Singleton, leaf-ending branches have their own data constructor, predicate labels and literals have a unified type.

Constructors

FURest :: NonEmpty t -> x -> FUPTrie t x 
FUMore :: t -> Maybe x -> NonEmpty (FUPTrie t x) -> FUPTrie t x 
FUPred :: t -> (t -> Maybe r) -> Maybe (r -> x) -> [FUPTrie t (r -> x)] -> FUPTrie t x 

lookup :: Eq t => NonEmpty t -> FUPTrie t x -> Maybe x Source

merge :: Eq t => FUPTrie t x -> FUPTrie t x -> FUPTrie t x Source

Overwrites when similar, leaves untouched when not

areDisjoint :: Eq t => FUPTrie t x -> FUPTrie t x -> Bool Source