hdiff-0.0.1: Pattern-Expression-based differencing of arbitrary types.

Safe HaskellSafe
LanguageHaskell2010

Data.WordTrie

Synopsis

Documentation

data Trie a Source #

A Trie indexed by Word64s.

Constructors

Fork 

Fields

Instances
Functor Trie Source # 
Instance details

Defined in Data.WordTrie

Methods

fmap :: (a -> b) -> Trie a -> Trie b #

(<$) :: a -> Trie b -> Trie a #

Eq a => Eq (Trie a) Source # 
Instance details

Defined in Data.WordTrie

Methods

(==) :: Trie a -> Trie a -> Bool #

(/=) :: Trie a -> Trie a -> Bool #

Show a => Show (Trie a) Source # 
Instance details

Defined in Data.WordTrie

Methods

showsPrec :: Int -> Trie a -> ShowS #

show :: Trie a -> String #

showList :: [Trie a] -> ShowS #

empty :: Trie a Source #

The empty trie

insertWith :: a -> (a -> a) -> [Word64] -> Trie a -> Trie a Source #

Inserts or modifies an element to a trie

insert :: a -> [Word64] -> Trie a -> Trie a Source #

Inserts a value overwriting any previous value associated with this key

lookup :: [Word64] -> Trie a -> Maybe a Source #

Performs a lookup on a trie

zipWith :: (a -> b -> c) -> Trie a -> Trie b -> Trie c Source #

Computes the intersection of two tries

mapAccum :: (a -> b -> (a, c)) -> a -> Trie b -> (a, Trie c) Source #

Maps over the trie carrying an accumulating parameter around

toList :: Trie a -> [([Word64], a)] Source #

Flattens a trie into a list