Safe Haskell | None |
---|---|

Language | Haskell2010 |

An implementation of heterogeneous tree-map by open unions.
This module uses the `Data.Map`

module inside,
see also https://hackage.haskell.org/package/containers.

- data UnionMap k r
- (\\) :: Ord k => UnionMap k r -> UnionMap k r -> UnionMap k r
- (!) :: (Ord k, Member a as) => UnionMap k as -> k -> a
- empty :: UnionMap k r
- singleton :: (Ord k, Member a as) => k -> a -> UnionMap k as
- null :: UnionMap k r -> Bool
- size :: UnionMap k r -> Int
- member :: Ord k => k -> UnionMap k r -> Bool
- notMember :: Ord k => k -> UnionMap k r -> Bool
- lookup :: (Ord k, Member a as) => k -> UnionMap k as -> Maybe a
- lookupU :: Ord k => k -> UnionMap k r -> Maybe (Union r)
- find :: (Ord k, Member a as) => k -> UnionMap k as -> a
- findU :: Ord k => k -> UnionMap k r -> Union r
- findWithDefault :: (Ord k, Member a as) => a -> k -> UnionMap k as -> a
- insert :: (Ord k, Member a as) => k -> a -> UnionMap k as -> UnionMap k as
- insertWith :: (Ord k, Member a as) => (a -> a -> a) -> k -> a -> UnionMap k as -> UnionMap k as
- insertWithKey :: (Ord k, Member a as) => (k -> a -> a -> a) -> k -> a -> UnionMap k as -> UnionMap k as
- delete :: Ord k => k -> UnionMap k as -> UnionMap k as
- adjust :: (Ord k, Member a as) => (a -> a) -> k -> UnionMap k as -> UnionMap k as
- adjustWithKey :: (Ord k, Member a as) => (k -> a -> a) -> k -> UnionMap k as -> UnionMap k as
- update :: (Ord k, Member a as) => (a -> Maybe a) -> k -> UnionMap k as -> UnionMap k as
- updateWithKey :: (Ord k, Member a as) => (k -> a -> Maybe a) -> k -> UnionMap k as -> UnionMap k as
- union :: Ord k => UnionMap k r -> UnionMap k r -> UnionMap k r
- unions :: Ord k => [UnionMap k r] -> UnionMap k r
- difference :: Ord k => UnionMap k r -> UnionMap k r -> UnionMap k r
- intersection :: Ord k => UnionMap k r -> UnionMap k r -> UnionMap k r
- keys :: UnionMap k r -> [k]
- rebuild :: Include r s => UnionMap k r -> UnionMap k s
- mapU :: (Union r -> Union s) -> UnionMap k r -> UnionMap k s
- mapWithKeyU :: (k -> Union r -> Union s) -> UnionMap k r -> UnionMap k s
- mapU' :: (Union r -> a) -> UnionMap k r -> Map k a
- mapWithKeyU' :: (k -> Union r -> a) -> UnionMap k r -> Map k a
- filterU :: (Union r -> Bool) -> UnionMap k r -> UnionMap k r
- filterWithKeyU :: (k -> Union r -> Bool) -> UnionMap k r -> UnionMap k r
- foldrU :: (Union r -> b -> b) -> b -> UnionMap k r -> b
- foldrWithKeyU :: (k -> Union r -> b -> b) -> b -> UnionMap k r -> b
- foldlU' :: (a -> Union r -> a) -> a -> UnionMap k r -> a
- foldlWithKeyU' :: (a -> k -> Union r -> a) -> a -> UnionMap k r -> a
- showTree :: (Show k, Show (Union r)) => UnionMap k r -> String

# Map type

# Operators

# Construction

# Query

findWithDefault :: (Ord k, Member a as) => a -> k -> UnionMap k as -> a Source

## Insertion

insertWith :: (Ord k, Member a as) => (a -> a -> a) -> k -> a -> UnionMap k as -> UnionMap k as Source

insertWithKey :: (Ord k, Member a as) => (k -> a -> a -> a) -> k -> a -> UnionMap k as -> UnionMap k as Source

## Delete/Update

adjustWithKey :: (Ord k, Member a as) => (k -> a -> a) -> k -> UnionMap k as -> UnionMap k as Source

updateWithKey :: (Ord k, Member a as) => (k -> a -> Maybe a) -> k -> UnionMap k as -> UnionMap k as Source

# Set Operation

# Conversion

# Map

mapWithKeyU' :: (k -> Union r -> a) -> UnionMap k r -> Map k a Source

# Filter

# Folds

foldrWithKeyU :: (k -> Union r -> b -> b) -> b -> UnionMap k r -> b Source

foldlWithKeyU' :: (a -> k -> Union r -> a) -> a -> UnionMap k r -> a Source