pred-trie-0.2.4: Predicative tries

Safe HaskellSafe
LanguageHaskell2010

Data.Trie.Pred.Unified

Synopsis

Documentation

data RUPTrie t x Source

Constructors

Rooted 

Fields

root :: Maybe x
 
children :: [UPTrie t x]
 

Instances

Functor (RUPTrie t) Source 
Foldable (RUPTrie t) Source 
(Eq t, Eq x) => Eq (RUPTrie t x) Source 
Show t => Show (RUPTrie t x) Source 
Eq t => Monoid (RUPTrie t x) Source 
(Arbitrary t, Arbitrary x) => Arbitrary (RUPTrie t x) Source 

data UPTrie t x where Source

Constructors

UMore :: t -> Maybe x -> [UPTrie t x] -> UPTrie t x 
UPred :: t -> (t -> Maybe r) -> Maybe (r -> x) -> [UPTrie t (r -> x)] -> UPTrie t x 

Instances

Functor (UPTrie t) Source 
Foldable (UPTrie t) Source 
(Eq t, Eq x) => Eq (UPTrie t x) Source 
Show t => Show (UPTrie t x) Source

Ignores contents

Eq t => Semigroup (UPTrie t x) Source 
(Arbitrary t, Arbitrary x) => Arbitrary (UPTrie t x) Source

Can only generate literal examples

assignLit :: Eq t => [t] -> Maybe x -> RUPTrie t x -> RUPTrie t x Source

merge :: Eq t => RUPTrie t x -> RUPTrie t x -> RUPTrie t x Source

elem :: Eq t => [t] -> RUPTrie t x -> Bool Source

lookup :: Eq t => [t] -> RUPTrie t x -> Maybe x Source

lookupWithL :: Eq t => (t -> t) -> [t] -> RUPTrie t x -> Maybe x Source

Applies f to the last chunk.

lookupNearestParent :: Eq t => [t] -> RUPTrie t x -> Maybe x Source

lookupThrough :: Eq t => [t] -> RUPTrie t x -> [x] Source

Append contents up-to lookup path.

litSingleton :: [t] -> x -> RUPTrie t x Source

litExtrude :: [t] -> RUPTrie t x -> RUPTrie t x Source