Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data PrefixTree a
- = Leaf !Key !a
- | Branch {
- bCommonPref :: !Prefix
- bVal :: !(Maybe a)
- bPrefixMap :: !(PrefixMap a)
- singleT :: Key -> a -> PrefixTree a
- insertT :: Key -> a -> PrefixTree a -> PrefixTree a
- lookupT :: Key -> PrefixTree a -> Maybe a
- type PrefixMap a = HashMap Piece (PrefixTree a)
- single :: Key -> a -> PrefixMap a
- insert :: Key -> a -> PrefixMap a -> PrefixMap a
- lookup :: Key -> PrefixMap a -> Maybe a
- fromList :: [(Key, a)] -> PrefixMap a
- newtype Piece = Piece {}
- newtype Key = Key {}
- pattern (:||) :: Piece -> [Piece] -> Key
- type Prefix = Key
- data KeysDiff
Documentation
data PrefixTree a Source #
Data structure to represent table tree for toml
.
Leaf !Key !a | |
Branch | |
|
Eq a => Eq (PrefixTree a) Source # | |
Show a => Show (PrefixTree a) Source # | |
singleT :: Key -> a -> PrefixTree a Source #
Creates a PrefixTree
of one key-value element.
insertT :: Key -> a -> PrefixTree a -> PrefixTree a Source #
Inserts key-value element into the given PrefixTree
.
lookupT :: Key -> PrefixTree a -> Maybe a Source #
Looks up the value at a key in the PrefixTree
.
type PrefixMap a = HashMap Piece (PrefixTree a) Source #
Map of layer names and corresponding PrefixTree
s.
insert :: Key -> a -> PrefixMap a -> PrefixMap a Source #
Inserts key-value element into the given PrefixMap
.
fromList :: [(Key, a)] -> PrefixMap a Source #
Constructs PrettyMap
structure from the given list of Key
and value pairs.
Types
Represents the key piece of some layer.
Key of value in key = val
pair. Represents as non-empty list of key
components -- Piece
s. Key like
site."google.com"
is represented like
Key (Piece "site" :| [Piece "\"google.com\""])