| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Trie.Class
Contents
- class Trie p s t | t -> p where
- 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 {}
- 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)
Instances
| (Hashable p, Eq p) => Trie NonEmpty p HashMapTrie Source # | |
| Eq s => Trie NonEmpty s KnuthTrie Source # | |
| Eq s => Trie NonEmpty s ListTrie Source # | |
| Ord s => Trie NonEmpty s MapTrie Source # | |
| Trie Identity ByteString BSTrie Source # | |
| (Hashable p, Eq p, Trie NonEmpty p c) => Trie NonEmpty p (HashMapStep c) Source # | |
| (Ord p, Trie NonEmpty p c) => Trie NonEmpty p (MapStep c) Source # | No insertion instance - requires children nodes to be a monoid. Use |
Conversion
ByteString-Trie
Embeds an empty ByteString passed around for type inference.
makeBSTrie :: Trie a -> BSTrie ByteString a Source #