Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
This module exposes internal representation of TSet
.
TSet has one invariant condition:
- Subtrees of an
TSet
should not be empty.
For example, consider following tree structure which is valid:
> fromList ["a", "aa", "bc"] Root -> False 'a' -> True 'a' -> True 'b' -> False 'c' -> True
Adding redundant node which represents empty set does not change
what an TSet
represents.
Root -> False 'a' -> True 'a' -> True 'b' -> False 'c' -> True 'd' -> False 'e' -> False 'f' -> False
But such TSet
should not exist because it confuses Eq
and Ord
instances and null
function.
Documentation
Instances
Functor (Node c) Source # | |
Foldable (Node c) Source # | |
Defined in Data.Trie.Set.Hidden fold :: Monoid m => Node c m -> m # foldMap :: Monoid m => (a -> m) -> Node c a -> m # foldr :: (a -> b -> b) -> b -> Node c a -> b # foldr' :: (a -> b -> b) -> b -> Node c a -> b # foldl :: (b -> a -> b) -> b -> Node c a -> b # foldl' :: (b -> a -> b) -> b -> Node c a -> b # foldr1 :: (a -> a -> a) -> Node c a -> a # foldl1 :: (a -> a -> a) -> Node c a -> a # elem :: Eq a => a -> Node c a -> Bool # maximum :: Ord a => Node c a -> a # minimum :: Ord a => Node c a -> a # | |
Traversable (Node c) Source # | |
(Eq c, Eq r) => Eq (Node c r) Source # | |
(Ord c, Ord r) => Ord (Node c r) Source # | |
Defined in Data.Trie.Set.Hidden | |
(Show c, Show r) => Show (Node c r) Source # | |
(NFData c, NFData r) => NFData (Node c r) Source # | |
Defined in Data.Trie.Set.Hidden |