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

Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Trie.Rooted

Synopsis

Documentation

data Rooted t a Source

Constructors

Rooted 

Fields

root :: Maybe a
 
children :: [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

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

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

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

push :: Rooted t a -> NonEmpty t -> PseudoTrie t a Source

Prepend root with a tag

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

Disjoint cases just pull children to common root