pred-trie-0.0.1: Predicative tries

Safe HaskellSafe
LanguageHaskell2010

Data.Trie.Pred

Synopsis

Documentation

data PredTrie p t x where Source

A predicative trie is composed of explicit predicate labels (for equality tests of predicates), a type for node labels, and some content type

Constructors

Rest :: NonEmpty t -> x -> PredTrie p t x 
More :: t -> Maybe x -> NonEmpty (PredTrie p t x) -> PredTrie p t x 
Pred :: p -> (t -> Maybe r) -> Maybe (r -> x) -> [PredTrie p t (r -> x)] -> PredTrie p t x 

lookup :: Eq t => NonEmpty t -> PredTrie p t x -> Maybe x Source

merge :: (Eq t, Eq p) => PredTrie p t x -> PredTrie p t x -> PredTrie p t x Source

Overwrites when similar, leaves untouched when not

areDisjoint :: (Eq t, Eq p) => PredTrie p t x -> PredTrie p t x -> Bool Source