Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class Trie p s t | t -> p where
- lookupWithDefault :: Trie p s t => a -> p s -> t s a -> a
- member :: Trie p s t => p s -> t s a -> Bool
- notMember :: Trie p s t => p s -> t s a -> Bool
- fromFoldable :: (Foldable f, Monoid (t s a), Trie p s t) => f (p s, a) -> t s a
- newtype BSTrie q a = BSTrie {
- unBSTrie :: (q, Trie a)
- makeBSTrie :: Trie a -> BSTrie ByteString a
- getBSTrie :: BSTrie ByteString a -> Trie a
Documentation
class Trie p s t | t -> p where Source
Class representing tries with single-threaded insertion, deletion, and lookup.
forall ts ps a. isJust $ lookupPath ps (insertPath ps a ts)
forall ts ps. isNothing $ lookupPath ps (deletePath ps ts)
Trie Identity ByteString BSTrie Source | |
Eq s => Trie NonEmpty s KnuthTrie Source | |
Eq s => Trie NonEmpty s ListTrie Source | |
Ord s => Trie NonEmpty s MapTrie Source | |
(Ord p, Trie NonEmpty p c) => Trie NonEmpty p (MapStep c) Source | No insertion instance - requires children nodes to be a monoid. Use |
lookupWithDefault :: Trie p s t => a -> p s -> t s a -> a Source
Conversion
fromFoldable :: (Foldable f, Monoid (t s a), Trie p s t) => f (p s, a) -> t s a Source
ByteString-Trie
Embeds an empty ByteString passed around for type inference.
makeBSTrie :: Trie a -> BSTrie ByteString a Source
getBSTrie :: BSTrie ByteString a -> Trie a Source