pseudo-trie-0.0.4: A tagged rose-tree with short circuited unique leaves

Safe HaskellNone
LanguageHaskell2010

Data.Trie.Rooted

Synopsis

Documentation

data Rooted t a Source

Constructors

Rooted (Maybe a) [PseudoTrie t a] 

Instances

Functor (Rooted t) 
Eq t => Applicative (Rooted t)

Intersection instance

(Eq t, Eq a) => Eq (Rooted t a) 
(Show t, Show a) => Show (Rooted t a) 
(Eq t, Monoid a) => Monoid (Rooted t a)

Union instance

Arbitrary a => Arbitrary (Rooted String a) 

newtype MergeRooted t a Source

Constructors

MergeRooted 

Fields

unMergeRooted :: Rooted t a
 

Instances

assign :: Eq t => [t] -> Maybe a -> Rooted t a -> Rooted t a Source

Strictly constructive form of Data.Trie.Pseudo.assign

lookup :: Eq t => [t] -> Rooted t a -> Maybe a Source

merge :: Eq t => Rooted t a -> Rooted t a -> Rooted t a Source

unionWith :: Eq t => (a -> a -> a) -> Rooted t a -> Rooted t a -> Rooted t a Source

Disjoint cases just pull children to common root