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