tries-0.0.3: Various trie implementations in Haskell

Safe HaskellNone




One Step

newtype MapStep c p a Source




unMapStep :: Map p (Maybe a, Maybe (c p a))


(Ord p, Trie NonEmpty p c) => Trie NonEmpty p (MapStep c) Source

No insertion instance - requires children nodes to be a monoid. Use Data.Trie.Map.insert instead.

Functor (c p) => Functor (MapStep c p) Source 
Foldable (c p) => Foldable (MapStep c p) Source 
Traversable (c p) => Traversable (MapStep c p) Source 
(Eq p, Eq a, Eq (c p a)) => Eq (MapStep c p a) Source 
(Data p, Data a, Data (c p a), Ord p, Typeable (* -> * -> *) c) => Data (MapStep c p a) Source 
(Ord p, Ord a, Ord (c p a)) => Ord (MapStep c p a) Source 
(Show p, Show a, Show (c p a)) => Show (MapStep c p a) Source 
Generic (MapStep c p a) Source 
(Ord s, Monoid (c s a)) => Monoid (MapStep c s a) Source 
(NFData (c p a), NFData p, NFData a) => NFData (MapStep c p a) Source 
(Arbitrary a, Arbitrary p, Arbitrary (c p a), Ord p) => Arbitrary (MapStep c p a) Source 
type Rep (MapStep c p a) Source 

insert :: (Ord p, Trie NonEmpty p c, Monoid (c p a)) => NonEmpty p -> a -> MapStep c p a -> MapStep c p a Source

singleton :: s -> a -> MapStep c s a Source

Fixpoint of Steps

newtype MapTrie s a Source




unMapTrie :: MapStep MapTrie s a


Ord s => Trie NonEmpty s MapTrie Source 
Functor (MapTrie s) Source 
Foldable (MapTrie s) Source 
Traversable (MapTrie s) Source 
Ord s => Lookup (MapTrie s) Source 
(Eq s, Eq a) => Eq (MapTrie s a) Source 
(Ord s, Ord a) => Ord (MapTrie s a) Source 
(Show s, Show a) => Show (MapTrie s a) Source 
Ord s => Monoid (MapTrie s a) Source 
(Ord s, Arbitrary s, Arbitrary a) => Arbitrary (MapTrie s a) Source 
type Key (MapTrie s) = NonEmpty s Source 


keys :: Ord s => MapTrie s a -> [NonEmpty s] Source

elems :: MapTrie s a -> [a] Source


subtrie :: Ord s => NonEmpty s -> MapTrie s a -> Maybe (MapTrie s a) Source

match :: Ord s => NonEmpty s -> MapTrie s a -> Maybe (NonEmpty s, a, [s]) Source

matches :: Ord s => NonEmpty s -> MapTrie s a -> [(NonEmpty s, a, [s])] Source

Returns a list of all the nodes along the path to the furthest point in the query, in order of the path walked from the root to the furthest point.